Forgot bit locker pin, forgot bit locker recovery key, 5 Easy ways to fix

Image
 Did you forgot your bit locker pin and recovery key. Try these methods, I hop it help you. 1. When you see this screen, Press "Esc" key in your keyboard for more recovery option. It will say preparing BitLocker recovery, You will see the screen bellow in few minute. Here we will click on "Skip the drive", You will see the screen bellow. Here you need to Turn off your PC, and then enter the BIOS of your PC. In order to enter BIOS, check for your PC brand and model and search on google, how to enter BIOS for your particular brand and model of your PC. Search for "Secure Boot" Enable it and check it, if it works for you. If it do not work, come back to same place and Disable "Secure Boot" and try again, see if it work for you. 2. If the above method do not work for you, try resetting your PC, You can choose any of the two option for resetting your PC, "Keep my files" or "Remove everything" whichever works for you. 3. If the abov...

What is Python While Loops and how to use it?

A **`while` loop** in Python is used to repeatedly execute a block of code as long as a given condition is `True`. It's commonly used when the number of iterations is not known ahead of time and depends on some dynamic condition.

### Syntax of `while` loop:

```python

while condition:

# code block

```

- **`condition`**: This is an expression that gets evaluated before each iteration of the loop. If the condition is `True`, the loop continues; if it's `False`, the loop stops.

- The code inside the loop (called the **loop body**) will continue to execute until the condition becomes `False`.

### Example of a `while` loop:

```python

# Example: Print numbers from 1 to 5

count = 1

while count <= 5:

    print(count)

    count += 1  # increment the count

```

**Output:**

```

1

2

3

4

5

```

In this example:

- The loop runs as long as `count <= 5`.

- Each time through the loop, `count` is incremented by 1.

- The loop stops when `count` becomes 6 (because `6 <= 5` is `False`).

### `while` with `else`:

A `while` loop can also have an optional `else` block, which is executed when the condition becomes `False`.

```python

count = 1

while count <= 3:

    print(count)

    count += 1

else:

    print("Loop finished")

```

**Output:**

```

1

2

3

Loop finished

```

### Infinite Loop:

If the condition never becomes `False`, the loop will run indefinitely. This is called an **infinite loop**.

 

```python

# Be careful, this is an infinite loop:

while True:

    print("This will run forever!")

```

### Breaking out of a `while` loop:

You can use the `break` statement to exit the loop prematurely, regardless of the condition.

```python

count = 1

while count <= 5:

    if count == 3:

        break  # Exit the loop when count equals 3

    print(count)

    count += 1

```

**Output:**

```

1

2

```

### Skipping an iteration:

You can use the `continue` statement to skip the rest of the code in the current iteration and jump to the next iteration.

```python

count = 0

while count < 5:

    count += 1

    if count == 3:

        continue  # Skip the rest of the code when count equals 3

    print(count)

```

**Output:**

```

1

2

4

5

```

Here, when `count` is 3, the `continue` statement skips the `print(count)` statement and moves to the next iteration.

### Summary:

- `while` loops are used when you want to repeat a block of code as long as a condition is `True`.

- You can control the loop flow using `break` to exit and `continue` to skip to the next iteration.

Popular posts from this blog

Top international payment gateway transaction fee comparison (2024)

What is Python Syntax and how to use?

How to Manage Boot Configuration of Windows using CMD