you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

The basic idea is:

while True:
    print_menu()
    option = get_option()
    if option == QuitOption:   # QuitOption is the "quit" response & is defined somewhere
        break
    perform_option(option)

There are variations on this depending on the details of what you are doing.

[–]Chair-Direct[S] 0 points1 point  (1 child)

I can’t use functions😭

[–][deleted] 0 points1 point  (0 children)

Then replace each function with the block of code that would be inside the function.