Question: In Python 3, Good code is organized into functions. This assignment allows you to demonstrate organizing your code into functions (including a main() function). Write

In Python 3,

Good code is organized into functions. This assignment allows you to demonstrate organizing your code into functions (including a main() function).

Write a program (with comments) that take an order of five different tacos at a taco shop.

You should have a helper function that prints a welcome message and the menu.

You should have another helper function for each item that a user can order that takes in the quantity of that item as an argument and returns the total cost (to 2 decimal places), where the follows are the prices.

Beef taco $2.90

Shrimp taco $3.00

Fish taco $3.25

Chicken taco $2.75

Lentil taco $2.50

These helper functions should not print nor request user input.

You should have a main() function that asks the user for the quantity of each of the five tacos and calculates the total cost of the order.

The main() function should also calculate the total with sales tax (8%). (The total price with sales tax is calculated by multiplying the total before tax by 1.08).

The main()function should print the users order as well as the total cost of the order before and after sales tax (all to at most 2 decimal places).

Example (user input highlighted in gray and in bold text):

Welcome to Dr. C's Taco Shop!

Menu:

Beef taco $2.90

Shrimp taco $3.00

Fish taco $3.25

Chicken taco $2.75

Lentil taco $2.50

How many barbeque beef tacos would you like? 0

How many shrimp and grits tacos would you like? 1

How many cajun fish grits tacos would you like? 2

How many chicken guacamole tacos would you like? 3

How many caramelized onion lentil tacos would you like? 4

Your order is:

0 Yummy Korean barbeque beef tacos

1 Awesome shrimp and grits tacos

2 Super cajun fish tacos

3 Delicious chicken guacamole tacos

4 Life extending caramelized onion lentil tacos

Your total before tax is $27.75

Your total with tax is $29.97

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!