Skip to content

Commit

Permalink
Merge pull request #671 from sborrego/patch-2
Browse files Browse the repository at this point in the history
fix conditional logic ordering
  • Loading branch information
alee authored Feb 16, 2024
2 parents 2408c73 + 0f40714 commit fee164f
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 fee164f

Please sign in to comment.