solution

Need help with Python.

For this assignment you will need to write a program to process a table’s order at a restaurant. You will need to define a variable, table_order, that has a list of the menu items the table ordered (one will be provided for testing purposes). A second list will contain the prices of these menu items. Your program will need to process these lists and compute a receipt. The receipt will be output to the user. The receipt should contain the following:

1. A restaurant heading

2. Menu item and price, one per line

3. A total

4. The amount of tax on the order

5. A grand total including tax

6. A goodbye message

Example Output

Tony’s Italian Diner Receipt

Pasta Bolognese – $10.99

Pasta Carbonara – $11.99

Salad – $2.99

Diet Coke – $1.99

Sprite – $1.99

Total: $29.95

Tax 6.25%: $1.87

Grand Total: $31.82

Thank you for dining with us! We hope to see you again!

Specifics

• When you calculate the tax and grand total, round down

. • Empty lists do not need to be handled or processed. Assume the program will never be run with empty lists

• Assume both lists are the same length

• The lists used to generate the sample output are: table_order = [“Pasta Bolognese”, “Pasta Carbonara”, “Salad”, “Diet Coke”, “Sprite”] menu_prices = [“10.99”, “11.99”, “2.99”, “1.99”, “1.99”]

• The restaurant heading can be anything you want (must be different than this example), but must be present

• The goodbye message can be anything you want but must be present.

• I will test your program with the provided order and prices lists, but will use others to verify its functionality

. • You must use for loops. Your program must expect two lists, named order and prices, to be defined at the start of the program, and process them.

Hints • The order and prices list match up – that is, the price in prices[0] goes with order[0]. The same is true for all elements in both arrays. • You only need one for loop • When you define your own lists, make sure the lengths are the same!

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!