Question: Write a program to calculate the total for a fast food order The menu is: burger is $ 1 . 9 9 fries are $

Write a program to calculate the total for a fast food order
The menu is:
burger is $1.99
fries are $0.99
drink is $1.59
chicken is $1.79
Prompt the user for an item and a quantity
Calculate the price for that item
Add it to the subtotal
Print the subtotal of the order after each entry (rounded to 2 decimal places)
Prompt if there is more to enter
Print the order total at the end (rounded to 2 decimal places)
Do NOT round as you are doing the calculations. ONLY do the rounding within the print
You MUST have 2 functions in addition to main
One function should get the item and quantity from the user. It needs to return 2 values
The second function should calculate the price for a single entry given an item and quantity
Sample Run #1(bold, underlined text is what the user types):
Item? burger
Qty?1
Subtotal = $1.99
More? y
Item? fries
Qty?2
Subtotal = $3.97
More? y
Item? chicken
Qty?3
Subtotal = $9.34
More? y
Item? drink
Qty?4
Subtotal = $15.7
More? n
Order total: $15.7
Note that this in an introductory level class and this problem is meant to be completed using def functions, and other simple level functions. No class type functions are meant to be used.

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!