Skip to content

Commit aa12e0d

Browse files
committed
Unduplicate sessions 2/3 and add try/except
1 parent 02161a8 commit aa12e0d

File tree

4 files changed

+233
-303
lines changed

4 files changed

+233
-303
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ and their solutions.
2525
| ----------------- | ---- | ---- | ----------------- | --------------------- |
2626
| Session 0: Installing Python | | | [Notes][s0notes] | [PDF][s0pdf] |
2727
| Session 1: Syntax and Variables | 2 | 26/10 | [Notes][s1notes] | [PDF][s1pdf]|
28-
| Session 2: If statements | 3 | 2/11 | [Notes][s2notes] | [PDF][s2pdf] |
29-
| Session 3: For loops and While loops | 4 | 9/11 | [Notes][s3notes] | [PDF][s3pdf]|
28+
| Session 2: If statements, For loops | 3 | 2/11 | [Notes][s2notes] | [PDF][s2pdf] |
29+
| Session 3: While loops, Try | 4 | 9/11 | [Notes][s3notes] | [PDF][s3pdf]|
3030
| Session 4: Lists | 5 | 16/11 | [Notes][s4notes] | [PDF][s4pdf] |
3131
| Session 5: Functions | 6 | 23/11 | [Notes][s5notes] | [PDF][s5pdf] |
3232
| Session 6: Turtle Graphics | 7 | 30/11 | Work in progress | Work in progress |

session2/Notes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ if ((1 <= number and number < 10) or number == 42) and (not number == 3):
112112
print("This was the number: " + str(number))
113113
```
114114

115-
This code will only print `number` if it is one of the numbers [0, 1, 2, 4, 5, 6, 7, 8, 9, 42].
115+
This code will only print `number` if it is one of the numbers [1, 2, 4, 5, 6, 7, 8, 9, 42].
116116

117117
*Note: there is an order of operations on logical connectives as well (which you may wish to google); however, it is recommended that you insert parentheses if you are using multiple different connectives, like in the example above.*
118118

@@ -123,7 +123,7 @@ name = input("Please enter a name: ")
123123
if name == "Mark":
124124
print("Oh, hi Mark.")
125125
if name == "Johnny":
126-
print("Oh, hey Johnny, what's up?")
126+
print("Oh, hi Johnny.")
127127
else:
128128
print("Who is this?")
129129
```
@@ -261,7 +261,7 @@ print("* *")
261261
print("**********")
262262
```
263263

264-
But don't you think it is too repetitive? This is when loops come in handy. They allow you to repeatedly run the same piece of code multiple times. There are two types of loops, for and while loo;s.
264+
But don't you think it is too repetitive? This is when loops come in handy. They allow you to repeatedly run the same piece of code multiple times. There are two types of loops, for and while loops.
265265

266266
## For loops
267267

0 commit comments

Comments
 (0)