Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help me debug def hotelMenu(): print (1. Pizza = $12.00) print (2. Burger = $6.50) print (3. Pasta = $7.00) print (4. Hot Dog =

help me debug

def hotelMenu():

print ("1. Pizza = $12.00")

print ("2. Burger = $6.50")

print ("3. Pasta = $7.00")

print ("4. Hot Dog = $4.00")

print ("5. Fries = $2.00")

print ("6. Soda = $1.00")

print ("7. Complete Order")

choice = int(input('Make a selection: '))

while choice < 1 or choice > 7:

choice = int(input('Enter a valid selection: '))

Hcount =0

Scount =0

Fcount =0

if input == 1:

amount = int(input("Enter number of Hamburgers: "))

hcount += amount

elif input == 2:

amount = int(input("Enter number of Burgers: "))

scount += amount

elif input == 3:

amount = int(input("Enter number of Pastas: "))

fcount += amount

elif input == 4:

amount = int(input("Enter number of Hot Dogs: "))

fcount += amount

elif input == 5:

amount = int(input("Enter number of Fries: "))

fcount += amount

elif input == 6:

amount = int(input("Enter number of Soda: "))

fcount += amount

elif input == 7:

sub = (hcount * 1.00) + (scount * 1.30) + (fcount * 1.40)

tax = sub * 0.05

total = sub + tax

print('Number of Pizzas: {0}'.format(hcount))

print('Number of Burgers: {0}'.format(scount))

print('Number of Pasta: {0}'.format(fcount))

print('Number of Hot Dog: {0}'.format(fcount))

print('Number of Fries: {0}'.format(fcount))

print('Number of Soda: {0}'.format(fcount))

print('Subtotal: {:0.2f}'.format(sub))

print('Tax: {:0.2f}'.format(tax))

print('Total: {:0.2f}'.format(total))

hotelMenu()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Comment should this MNE have a global LGBT policy? Why/ why not?

Answered: 1 week ago