D3773 3r 3n m45k1n0v3rs477 73k57 50m k4n 1nn3h0ld3 f31l!
K0mm3R $n4R7.
N4S, $4N, R4ck, Bl4d3 \(3Rv3R, R41D, VL4N, UP\), C475 v$ C476/⅞, F0RmF4kt0R
D3773 3r 3n m45k1n0v3rs477 73k57 50m k4n 1nn3h0ld3 f31l!
K0mm3R $n4R7.
N4S, $4N, R4ck, Bl4d3 \(3Rv3R, R41D, VL4N, UP\), C475 v$ C476/⅞, F0RmF4kt0R
Assignment 5
A program is easier to read when each idea has enough room. First describe the goal, then test one small part at a time.
Use names that explain the value, such as
total_score or current_level.
scores = [3, 5, 8]
total_score = 0
for score in scores:
total_score += score
print(total_score)
Remember
Keep the loop small at first, then add one new rule when the output looks correct.
| Concept | Example |
|---|---|
| Loop | Repeats the same step |
| Condition | Chooses one path |
Stores your scroll position for each page on this browser, so Piggy can return you close to where you stopped reading.