ungleich-learning-circle/balazs/python-the-hard-way/ex35/notes_n_drills.org

390 B
Raw Blame History

*Drills

The gold_room has a weird way of getting you to type a number. What are all the bugs in this way of doing it? Can you make it better than what Ive written? Look at how int() works for clues.

Non greedy is less than 50 but only 1 and 0 qualify.

Nicer ways: -> check for numbers -> also check for None and All strings -> sanitize input for int(), (int can take 2 variables)