3 months ago
8 lines595 B
Exercises: lesson 6
- Make the example ask for its input instead of using a fixed value.
- Add a comment above each block explaining what it does, in your own words.
- Run
commands.shand change one value. Write down what you expect, then run it again and compare. - Time yourself: rewrite the example from memory in 10 minutes, then diff it against the original.
- Break the example on purpose: delete a bracket or misspell a name. Read the error message. Which line does it point to?
- What happens with an empty input? Change the code so it handles that case with a clear message.