Question
Using your pseudocode, create the decision structure that will determine the cost of an order of Mac N Cheese. Your app needs to ask the
Using your pseudocode, create the decision structure that will determine the cost of an order of Mac N Cheese. Your app needs to ask the user the size of Mac N Cheese (Small = $4.00, Medium = $5.00 and Large = $6.00) and also ask if they want any toppings. The app needs to print out the base cost of their order, the cost of the extras and the total.
ADD THESE TO CODE:
Bacon ==> $1.50 Grilled Onions ==> $1.00 Grilled Chicken ==> $2.50 Lobster ==> $5.00
#This program will calculate the cost of one order of Mac N Cheese
#Variables size = str() addons = str() sizecost = float() addonscost = float() total = float()
#Ask the user for the size of their order and their extra print("Enter the size of your order (S = Small, M = Medium, L = Large):") #Get input from user
#Disply extras menu print("What extra do you want?") print("\tB = Bacon") print("\tO = Grilled Onions") print("\tC = Grilled Chicken") print("\tL = Lobster") print("\tN = Nothing")
#Add code to input choice print("Enter your choice:") #Decide on the base cost and the addon cost #place decision structure here
#printing just to test
print("Testing size cost: ", sizecost) print("Testing add on cost: ", addonscost)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started