Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Assistance
#4
def menu():
    print("        Restaurant Register        ")
    print()
    print("Dish No.       Dish Name          Price")
    print("--------       ----------         ------")
    print("1              Gang Gai           $10.00")
    print("2              Pad Thai           $ 8.75")
    print("3              Pad Cashew         $ 9.50")
    print("4              Pad Prik           $10.25")
    print("5              Peanut Curry       $ 9.50")
    print("6              Curry Noodle       $11.25")
    print()



def bill():
    menu_items = ["1", 10.00, "2", 8.75, "3", 9.50, "4", 10.25, "5", 9.50, "6", 11.25]
    print("            Bill Information            ")
    print("------------------------------------")
    print("Total of all items:                 " + "$")
    print("Taxes:                              ", "+","$",(tax))
    print("                                     --------")
    print("                             Bill:           ")
    



menu_items = ["1", 10.00, "2", 8.75, "3", 9.50, "4", 10.25, "5", 9.50, "6", 11.25]
tax = (.06)
senior = (.10)
gift_card = (3.00)


while True:
    menu()
    selection = input("Enter the item number you want(1-6): ")
    if selection >= "7":
        print("Invalid item choice. Enter valid item number (1-6): ")
        print()
    elif selection == "1": 
        input("Are you 65 years old or older (Y or N)? ")
        if "n":
            input("Would you like to order another item (Y or N)? ")
            if "n":
                input("Do you have a gift card (Y or N)? ")
                bill()
                print()
                break 
This is what I have so far and this is the output when I run it


Restaurant Register

Dish No. Dish Name Price
-------- ---------- ------
1 Gang Gai $10.00
2 Pad Thai $ 8.75
3 Pad Cashew $ 9.50
4 Pad Prik $10.25
5 Peanut Curry $ 9.50
6 Curry Noodle $11.25

Enter the item number you want(1-6): 1
Are you 65 years old or older (Y or N)? n
Would you like to order another item (Y or N)? n
Do you have a gift card (Y or N)? n
Bill Information
------------------------------------
Total of all items: $
Taxes: + $ 0.06
--------
Bill:
Reply


Messages In This Thread
Need Assistance - by Jack_Daniels - May-16-2020, 05:35 AM
RE: Need Assistance - by ibreeden - May-16-2020, 12:12 PM
RE: Need Assistance - by Jack_Daniels - May-16-2020, 09:57 PM
RE: Need Assistance - by Jack_Daniels - May-16-2020, 10:59 PM
RE: Need Assistance - by ibreeden - May-17-2020, 08:58 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020