6 Main menu: Next customer!

In this chapter

  • Erik creates a main menu to serve many customers
  • Erik learns about Python dictionaries
  • Simon explains the top-down development approach

“Yesterday, we decided that we wanted to create a main menu,” Simon reminded Erik.

“Yes, you said if I wanted to use this program to serve many customers, I’d have to repeat the menus for each customer—ask their name and what they want to order.”

“Exactly right!” Simon said. “And what are you going to use to do that?”

“A loop, maybe? Like we did with menus. Repeat until the customer types the right numbers or types x.”

“You’re absolutely right!” Simon was really glad that his brother caught on to this programming idea so quickly. “We’ll ask the customer their name, ...

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.