Skip to content

Commit

Permalink
Update 13-conditionals.md: fixed example
Browse files Browse the repository at this point in the history
Example was written in the wrong order. I adjusted the grade A for the grade C
  • Loading branch information
sborrego authored Feb 16, 2024
1 parent 2408c73 commit 0f40714
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions episodes/13-conditionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ for m in masses:

```python
grade = 85
if grade >= 70:
print('grade is C')
if grade >= 90:
print('grade is A')
elif grade >= 80:
print('grade is B')
elif grade >= 90:
print('grade is A')
elif grade >= 70:
print('grade is C')
```

```output
grade is C
grade is B
```

- Does *not* automatically go back and re-evaluate if values change.
Expand Down

0 comments on commit 0f40714

Please sign in to comment.