Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 05.Loops.md #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions 05.Loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ The `else` clause is executed after the loop completes its execution without hit
# Example of else with a for loop
for number in range(3):
print(number)
if number >= 2:
if number > 2:
print('123213')
break
else:
Expand Down Expand Up @@ -439,7 +439,7 @@ for i in range(1, 4):
You can use [`Python Visualizer`](https://pythontutor.com/visualize.html#mode=edit) in order to understand the concept of `nested loops` better.


There are lots of practical cases where software engenieer can use nested loops. You will notice, that we sometimes coming back to them working with advanced data structures.
There are lots of practical cases where software engenieer can use nested loops. You will notice that we sometimes will be coming back to them working with advanced data structures.

### 3.1 Assigments

Expand Down Expand Up @@ -579,7 +579,7 @@ D) The else part is not valid for loops

### Task 1: The Guessing Game

**Objective:**: Write a program that selects a random number and asks the user to guess it. Use a while loop to allow multiple attempts until they guess correctly or choose to exit.
**Objective:** Write a program that selects a random number and asks the user to guess it. Use a while loop to allow multiple attempts until they guess correctly or choose to exit.


```
Expand All @@ -594,7 +594,7 @@ The correct number was 7. Better luck next time!

### Task 2: Nested loops

**Objective:**: Write a program using nested loops to match the following output.
**Objective:** Write a program using nested loops to match the following output.

```python
Output:
Expand All @@ -608,7 +608,7 @@ Output:

### Task 3: The Factorial Calculator

**Objective:**: Create a program that computes the factorial of a given number using a `for` loop.
**Objective:** Create a program that computes the factorial of a given number using a `for` loop.

```
Input:
Expand Down