Question: Write a function orderPizza that allows the user input to build a pizza. It then prints a thank you message, the cost of the pizza

Write a function orderPizza that allows the user input to build a pizza. It then prints a thank
you message, the cost of the pizza and then returns the Pizza that was built.Welcome to Python Pizza!
What size pizza would you like (S,M,L) : M
Type topping to add (or Enter to quit) : mushroom
Type topping to add (or Enter to quit) : onion
Type topping to add (or Enter to quit): garlic
Type topping to add (or Enter to quit):
Thanks for ordering!
Your pizza costs $14.299999999999999
Pizza('M',{'mushroom', 'onion', 'garlic'})Welcome to Python Pizza!
What size pizza would you like (S,M,L) : L
Type topping to add (or Enter to quit) : calamari
Type topping to add (or Enter to quit): garlic
Type topping to add (or Enter to quit):
Thanks for ordering!
Your pizza costs $16.65
Pizza('L',{'garlic', 'calamari'})
>>>p= orderpizza()
Welcome to Python Pizza!
What size pizza would you like (S,M,L): S
Type topping to add (or Enter to quit):
Thanks for ordering!
Your pizza costs $6.25
>>>p
Pizza('S 'ineset())
>>>
 Write a function orderPizza that allows the user input to build

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!