Question: What am I missing for my python program to run? def display _ menu ( ) : print ( Welcome to Sammy's Pizzas )
What am I missing for my python program to run?
def displaymenu:
printWelcome to Sammy's Pizzas"
printWhat size pizza would you like?"
print Small Cheese Pizza $
print Medium Cheese pizza $
print Large Cheese Pizza $
def getpizzasize:
while True:
try:
choice intinputEnter the number of what size you would like:
if choice in :
return choice
else:
printInvalid choice. Please use or
except ValueError:
printInvalid input please try again"
def gettoppings:
printEach topping is $ more"
print Your toppings choice is
Sausage
Pepperoni
Olives."
toppings pepperoni: "sausage": "olives":
while True:
try:
choice intinputEnter the number of your desired topping.
if choice in :
print fGreat you chose choice
return choice
else:
printInvalid choice. Please use or
except ValueError:
printInvalid input please try again"
def calculatecost size toppings:
baseprices :::
cost basepricessize
for topping in toppings.values:
cost topping
return cost
def main:
displaymenu
size getpizzasize
toppings gettoppings
totalcost calculatecost
printfYour total cost is $totalcost:f
if namemain:
main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
