Question: in Python 3. Programming Project Implement a program, lab2.py, that asks the users for items. For each item, read in the name, price, and if
in Python 3. Programming Project Implement a program, lab2.py, that asks the users for items. For each item, read in the name, price, and if the item is taxable. When the user says that do not want to add any more items, print out the full receipt.
The receipt must have the following contents:
Each item listed with it's price. The total cost of the items. The total tax charged on all items. The grand total with tax added. The current date when the receipt we generated. All values must be shown to two decimal places.
Hint: Formatted the numbers before you try to align them. Use two columns of 20 characters to make the lines look nice. Example Execution Trace Welcome to Receipt Creator Enter Item name: Hot Dog Enter Item Price: 5.15 Is the item taxable (yes/no): no Add another item (yes/no): yes Enter Item name: Soda Enter Item Price: 2.50 Is the item taxable (yes/no): yes Add another item (yes/no): yes Enter Item name: Pretzel Enter Item Price: 0.50 Is the item taxable (yes/no): no Add another item (yes/no): yes Enter Item name: Candy Bar Enter Item Price: 1.25 Is the item taxable (yes/no): yes Add another item (yes/no): no ----- Receipt 2018-01-02 16:21:49.515170 ----- Hot Dog_____________________________5.15 Soda________________________________2.50 Pretzel_____________________________0.50 Candy Bar___________________________1.25
Sub Total___________________________9.40 Tax_________________________________0.26 Total_______________________________9.66
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
