Skip to content

Commit ca217a2

Browse files
committed
fix missing semicolons in conditionals section
1 parent 9cb6fae commit ca217a2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Python/Module2_EssentialsOfPython/ConditionalStatements.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ if 3 < len(x):
227227
# bool(3 < 2) returns False, this code
228228
# block is skipped
229229
print("`x` has more than three items in it")
230-
elif len(x) == 2
230+
elif len(x) == 2:
231231
# bool(len(x) == 2) returns True
232232
# this code block is executed
233233
print("`x` has two items in it")
234-
elif len(x) == 1
234+
elif len(x) == 1:
235235
# this statement is never reached
236236
print("`x` has one items in it")
237237
else:
@@ -332,6 +332,8 @@ That is:
332332
Python supports a syntax for writing a restricted version of if-else statements in a single line. The following code:
333333

334334
```python
335+
num = 2
336+
335337
if num >= 0:
336338
sign = "positive"
337339
else:

Python/changes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ Changelog
55
This is a record of all past PLYMI releases and what went into them,
66
in reverse chronological order.
77

8+
----------
9+
2021-02-28
10+
----------
11+
12+
Fixes a syntax error (missing colons) in a code snippet in `a subsection about conditional expressions <https://www.pythonlikeyoumeanit.com/Module2_EssentialsOfPython/ConditionalStatements.html#if,-else,-and-elif>`_.
13+
14+
815
----------
916
2021-01-31
1017
----------

0 commit comments

Comments
 (0)