Question: Purchase Receipt (adapted from #4) Save the file as ch2_ex2.py Because of the strange rules of the store 3 Items Only, every customer is required

Purchase Receipt (adapted from #4) Save the file as ch2_ex2.py Because of the strange rules of the store 3 Items Only, every customer is required to purchase three items no more, no less. While unfriendly for customers who need fewer or more than three items, it makes your job of writing a receipt generating program much easier! Write a program that asks the user to enter a description and price for three different items. When the user enters the description, that description should be used in the following cost prompt. The program should then print an itemized list of the three items (description and price), then a line, subtotal, sales tax percentage, and sales tax charge, and then the total for the purchase. Your program must include appropriately named variable declarations that are float initialized for the three prices, subtotal, tax, and total. There should also be variables that are string initialized for the item descriptions. Additionally, a named constant (TAX_RATE) must hold San Antonios sales tax rate of 8.25%, and the sales tax line in the receipt must use the named constant variable, not a static text string. Your output should be formatted EXACTLY like this: Enter the description of item #1: Cat Litter Enter the price of Cat Litter: 16.99 Enter the description of item #2: Dish Soap Enter the price of Dish Soap: 2.89 Enter the description of item #3: Snack Crackers Enter the price of Snack Crackers: 4.99 Cat Litter $ 16.99 Dish Soap $ 2.89 Snack Crackers $ 4.99 -------------------------------- Subtotal: $ 24.87 Sales Tax 8.25%: $ 2.05 -------------------------------- Total: $ 26.92

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!