7 lines518 B

Exercises: lesson 6

  1. Rewrite the main part so it runs twice with two different inputs, without copying the code.
  2. What happens with an empty input? Change the code so it handles that case with a clear message.
  3. Time yourself: rewrite the example from memory in 10 minutes, then diff it against the original.
  4. Break the example on purpose: delete a bracket or misspell a name. Read the error message. Which line does it point to?
  5. Add a comment above each block explaining what it does, in your own words.