Question: 7. Shopping cart a. Write a function, receipt(), that asks the user to enter a grocery item, price, and quantity, and then displays an itemized

7. Shopping cart a. Write a function, receipt(), that asks the user to enter a grocery item, price, and quantity, and then displays an itemized receipt as shown below: Enter item: hot dog Enter price: 2.60 Enter quantity: 5 RECEIPT 5 hot dog @ $2.00 - $10.00 TOTAL: $10.00 b. (Optional, but may help with the next part.) Extend your function to ask for a second item, and display the second item's receipt output immediately after it is entered. Remember to update the total cost at the end c. Extend the function to allow the user to enter the number of groceries purchased at the beginning, and then output an itemized receipt with each item
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
