Sep-22-2020, 09:42 AM
I am really new to python, I just studied for a few days.
The home work is:
You display 3 ticket types, cheap, medium, and expensive (each is given a price, e. g,
cheap = 500,
medium = 700,
expensive = 1000
Then, entertainment is given
entertainment = 100
wifi is given too,
wifi = 200
then, you give 5 options: 1)add entertainment, 2)add wifi, 3)remove entertainment, 4)remove wifi,5)finalize price. UNTIL the user chooses 5, the options will continue to pop up, it means to return to the menu, but without resetting the menu, means, if you choose 1, then you can continue to choose 2, and continue to 3, and continue to 4. And so on.
The task here is that, you must allow user to input one type of ticket, then choose add 1) or/and 2), remove 1) or/and remove 2), then whatever the user chooses, for example, 1-2-3-4, or 1-2-3, or 1-3, or 2-4, or 1, or 2, or 1-2, then if he chooses 5) which is to finalize the price, the results must be correct.
What I HAVE done is to create a while loop for the options menu, but I dont see how to jump out the loop, if I jump out the loop, I dont see how I calculate the price to be specific.
I have changed the variable names here, so anyone can just give me a structure?
I would really appreciate any help.
I dont want the answer to my homework directly, however I am really new, so I do want to know how all these work with clear examples. Thanks a lot guys!
The home work is:
You display 3 ticket types, cheap, medium, and expensive (each is given a price, e. g,
cheap = 500,
medium = 700,
expensive = 1000
Then, entertainment is given
entertainment = 100
wifi is given too,
wifi = 200
then, you give 5 options: 1)add entertainment, 2)add wifi, 3)remove entertainment, 4)remove wifi,5)finalize price. UNTIL the user chooses 5, the options will continue to pop up, it means to return to the menu, but without resetting the menu, means, if you choose 1, then you can continue to choose 2, and continue to 3, and continue to 4. And so on.
The task here is that, you must allow user to input one type of ticket, then choose add 1) or/and 2), remove 1) or/and remove 2), then whatever the user chooses, for example, 1-2-3-4, or 1-2-3, or 1-3, or 2-4, or 1, or 2, or 1-2, then if he chooses 5) which is to finalize the price, the results must be correct.
What I HAVE done is to create a while loop for the options menu, but I dont see how to jump out the loop, if I jump out the loop, I dont see how I calculate the price to be specific.
I have changed the variable names here, so anyone can just give me a structure?
I would really appreciate any help.
I dont want the answer to my homework directly, however I am really new, so I do want to know how all these work with clear examples. Thanks a lot guys!