Create a Python program that:
Creates a sales receipt, displays the receipt entries and
totals, and saves...
80.2K
Verified Solution
Link Copied!
Question
Programming
Create a Python program that:
Creates a sales receipt, displays the receipt entries andtotals, and saves the receipt entries to a file
Prompt the user to enter the
Item Name
Item Quantity
Item Price
Display the item name, the quantity, and item price, and theextended price (Item Quantity multiplied by Item Price) after theentry is made
Save the item name, quantity, item price, and extended price toa file
When you create the file, prompt the user for the name theywant to give the file
Separate the items saved with commas
Each entry should be on a separate line in the text file
Ask the user if they have more items to enter
Once the user has finished entering items
Close the file with the items entered
Display the sales total
If the sales total is more than $100
Calculate and display a 10% discount
Calculate and display the sales tax using 8% as the sales taxrate
The sales tax should be calculated on the sales total after thediscount
Display the total for the sales receipt
Savethe program and submit it to this site for grading.
Answer & Explanation
Solved by verified expert
3.9 Ratings (736 Votes)
SOLUTIONI have solve the problem in python code with comments andscreenshot for easy understanding CODEpython codeMain functiondef main Empty list l taking inputs from user nameinputEnter item name quantityintinputEnter itemquantity pricefloatinputEnter item price Printing all details of item printname name printQuantity quantity printPrice price Calculating and displaying
See Answer
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
Unlimited Question Access with detailed Answers
Zin AI - 3 Million Words
10 Dall-E 3 Images
20 Plot Generations
Conversation with Dialogue Memory
No Ads, Ever!
Access to Our Best AI Platform: Zin AI - Your personal assistant for all your inquiries!