9 Complete the menu: A real program
In this chapter
- Erik and Simon create load and save functions in the main program
- Simon adds exit functions to the main menu and
get_order()
function - Simon explains why he thinks Erik just created a real program
- The brothers discuss future plans
“Now let’s get real,” Simon said. “Yesterday, we played with sample orders and simple programs. Today, it’s time to use what you learned in your real program.”
“Yes, let’s do it!” Erik said.
“Open your main_menu.py
file, where you wrote the main menu. We should add a couple of functions there to work with the JSON file. Let’s recall what we have to do first.” Simon pulled out his diagram from yesterday.
“We have to write a function that will load the list of orders ...
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.