Question: In this assignment, you create a dialog asking for information about items to be purchased, and then calculate the total payment based on a fixed
In this assignment, you create a dialog asking for information about items to be purchased, and then calculate the total payment based on a fixed sale tax rate of 5.25%. (Python) Here is how your program should work: 1) When your program is executed, it asks a sequence of questions to get users inputs: Whats the items name? Example: Watermelon Whats the unit price? Example: 10 How many units are you purchasing? Example: 2 The above process should be repeated for 3 times. 2) Then your program will perform the calculations and output the results like the following: ********************************************** Store Name: EC 7-11 Store Date and time of Purchase: 2022-09-20 16:25:23.242868 ********************************************** ##### Items purchased ##### ------------------------------------------------------ Item 1: Watermelon The unit price: $10 Units purchased: 2 Sales tax rate: 5.25% Sales tax is: $1.05 The total price: $21.05 ------------------------------------------------------ Item 2: Notepad ..... ------------------------------------------------------ Item 3: USB drive ..... ------------------------------------------------------ ##### Summary of Items purchased ##### ----------------------------------------------------------------- Item name Unit price Units Tax Price ------------ ------------ ------ ------ ------ Watermelon 10.00 2 1.05 21.05 Notepad 5.00 4 1.05 21.05 Items 3 20.00 1 1.05 21.05 ------------------------------------------------------------------ Total Payment: $63.15 ********************************************* By salesperson: your full name **********************************************
Other Requirements: Use the round function to round a number to 2 decimal digits. See an example below. o Follow the best practice in coding. Include a DocString section in the beginning of your program. Include comment lines properly in your code to explain major lines of code. Be sure to follow variable naming rules. Use proper data types for your variables. Use blank lines to improve output display.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
