Question: the code is in Python Write a Fast Food program that uses functions to display a menu of items to the user, takes the order,

the code is in Python

Write a Fast Food program that uses functions to display a menu of items to the user, takes the order, and calculates the total. The user selects which item they would like and how many of that item they would like. The user continues to enter items until they are finished. Once they have signified that they are done, calculate the total cost and display it to the user along with the total number of items. Note: the user should be able to go back and add more of any given item and it will update the total number of items and the subtotal. Write the following functions:

1. Get the menu input you can use the example below, or make up your own items and prices (but have three items to sell). Take in the users input, check that it is in range of the menu options and return the value.

2. Get the quantity input prompt the user to input the quantity of the item selected. Check that it is a positive value and return the value.

3. Calculate item subtotal pass in the price of the item and the quantity, return the subtotal for that item.

4. Calculate tax pass in the subtotal of all items, compute and return the price of tax. Tax for this restaurant is 9%.

5. Display receipt pass in the subtotal, tax, and total number of items. Calculate the final total, and display the subtotal, tax, and final total, all with two places of decimal formatting.

Example Output:

MacDoogles: 1. Hamburger = $1.50 2. Soda = $1.15 3. Fries = $1.25 4. Complete Order 2

Enter Number of Sodas: 1

MacDoogles: 1. Hamburger = $1.50 2. Soda = $1.15 3. Fries = $1.25 4. Complete Order 1 Enter Number of Hamburgers: 2

MacDoogles: 1. Hamburger = $1.50 2. Soda = $1.15 3. Fries = $1.25 4. Complete Order 2 Enter Number of Sodas: 1

MacDoogles: 1. Hamburger = $1.50 2. Soda = $1.15 3. Fries = $1.25 4. Complete Order 4

Subtotal: $5.30 Tax: $0.48 Total Cost: $5.78 Number of items: 4

Enjoy Your Meal!

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!