8 lines584 B

Exercises: lesson 4

  1. Time yourself: rewrite the example from memory in 10 minutes, then diff it against the original.
  2. Add a check that prints a warning when a result looks wrong (negative, empty, too big).
  3. Rewrite the main part so it runs twice with two different inputs, without copying the code.
  4. Run loops.py and change one value. Write down what you expect, then run it again and compare.
  5. Explain the example to someone who hasn't taken the course. Which part was hardest to explain?
  6. Add a comment above each block explaining what it does, in your own words.