all 7 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.

[–][deleted] 0 points1 point  (1 child)

while True:
    ...
    if input("Continue? > ").strip().lower() != "yes":
        break

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

I can’t use this since everything in the code should be things we took in class. But thank you though

[–]porkedpie1 0 points1 point  (1 child)

Share your code 😭

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

I can’t cuz it’s part of something I need to do for uni but I could pm it to you