4 User errors: Everybody makes mistakes
In this chapter
- Erik discovers that users don’t always do what you tell them to
- Erik learns how to use loops to repeat his question to the user
- Simon helps Erik make the menus more robust
“Yesterday you did a great job, Erik,” Simon said the next day. “You wrote a very good function, you added default arguments, and you tested it.”
“Yes,” Erik answered. “I think it’s a good program. I want to show it to my friends!”
“Wait, wait,” Simon said. “I don’t think it’s ready to use yet.”
“Why? I think it works perfectly!”
“Oh, really? Let me try.” Simon looked like he had something in mind. He started Erik’s program again, and at the first menu he entered coffee
:
Erik's drinks -------------------------------- ...
Get A Pythonic Adventure now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.