receipt.py Your goal for this program is to provide a sales receipt for a purchase transaction at a retail store. Imagine a time before fancy scanners and people had to manually enter the cost of the items one by one. Because we don't have use of lists or dictionaries yet (based on our progress in the book), we will only output a few values, not every item entered, on our final receipt. For this program, you will need to do the following 1) When the script first runs, it should assume you are ready to enter transactions, but should prompt the user for appropriate action (like "Enter the next item cost..." or similar). 2) The user should be able to enter a number (the cost of the item). The script should reject negative numbers and not include them in the final tally. Zero cost items are considered OK to include (imagine special perk items, etc.). 3) After each item cost is entered, whether it is successfully added (positive number or zero) or not (negative number) the clerk should be prompted whether they want to enter more items. If yes, then accept additional items, prompting after each about whether or not to accept more items or to complete the transaction. 4) When the clerk has indicated that the transaction is complete, your program should output the following summary of the transaction Number of items: Discount eligible items: Subtotal: Discount: 5 then a discount of 5% should be applied, this should show how much that 5% comes to> • Tax: Grand Total: 5) The currency amounts should be formatted to 2 decimal places. This program, done with Python capabilities covered through chapter 3, will require if statements, while loop, sentinel controlled repetition, formatting, etc. fo . If you are newer to programming, you may try using psuedocode to create the structure of what your program needs to do using non-code language so you can think thoroughly about what you need to do before jumping in to the code. PREPARATE You will submit your Python script named "receipt.py" before the deadline.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
Help me on below python program.
receipt.py
Your goal for this program is to provide a sales receipt for a purchase transaction at a retail store. Imagine a time before fancy scanners and people had to
manually enter the cost of the items one by one. Because we don't have use of lists or dictionaries yet (based on our progress in the book), we will only
output a few values, not every item entered, on our final receipt. For this program, you will need to do the following
1) When the script first runs, it should assume you are ready to enter transactions, but should prompt the user for appropriate action (like "Enter the next
item cost... or similar).
2) The user should be able to enter a number (the cost of the item). The script should reject negative numbers and not include them in the final tally. Zero
cost items are considered OK to include (imagine special perk items, etc.).
3) After each item cost is entered, whether it is successfully added (positive number or zero) or not (negative number) the clerk should be prompted whether
they want to enter more items. If yes, then accept additional items, prompting after each about whether or not to accept more items or to complete the
transaction.
4) When the clerk has indicated that the transaction is complete, your program should output the following summary of the transaction
Number of items: <number of items>
Discount eligible items: <number of items with non-zero cost>
Subtotal: <total of items entered by clerk>
Discount: <if the discount eligible item count is > 5 then a discount of 5% should be applied, this should show how much that 5% comes to>
• Tax: <tax amount, 6.5% sales tax, based on the discounted amount which is subtotal discount>
Grand Total: <discounted amount + tax>
5) The currency amounts should be formatted to 2 decimal places.
This program, done with Python capabilities covered through chapter 3, will require if statements, while loop, sentinel controlled repetition, formatting, etc.
Pada a
If you are newer to programming, you may try using psuedocode to create the structure of what your program needs to do using non-code language so you
can think thoroughly about what you need to do before jumping in to the code.
PORTES DE
You will submit your Python script named "receipt.py" before the deadline.
.
Transcribed Image Text:receipt.py Your goal for this program is to provide a sales receipt for a purchase transaction at a retail store. Imagine a time before fancy scanners and people had to manually enter the cost of the items one by one. Because we don't have use of lists or dictionaries yet (based on our progress in the book), we will only output a few values, not every item entered, on our final receipt. For this program, you will need to do the following 1) When the script first runs, it should assume you are ready to enter transactions, but should prompt the user for appropriate action (like "Enter the next item cost... or similar). 2) The user should be able to enter a number (the cost of the item). The script should reject negative numbers and not include them in the final tally. Zero cost items are considered OK to include (imagine special perk items, etc.). 3) After each item cost is entered, whether it is successfully added (positive number or zero) or not (negative number) the clerk should be prompted whether they want to enter more items. If yes, then accept additional items, prompting after each about whether or not to accept more items or to complete the transaction. 4) When the clerk has indicated that the transaction is complete, your program should output the following summary of the transaction Number of items: <number of items> Discount eligible items: <number of items with non-zero cost> Subtotal: <total of items entered by clerk> Discount: <if the discount eligible item count is > 5 then a discount of 5% should be applied, this should show how much that 5% comes to> • Tax: <tax amount, 6.5% sales tax, based on the discounted amount which is subtotal discount> Grand Total: <discounted amount + tax> 5) The currency amounts should be formatted to 2 decimal places. This program, done with Python capabilities covered through chapter 3, will require if statements, while loop, sentinel controlled repetition, formatting, etc. Pada a If you are newer to programming, you may try using psuedocode to create the structure of what your program needs to do using non-code language so you can think thoroughly about what you need to do before jumping in to the code. PORTES DE You will submit your Python script named "receipt.py" before the deadline. .
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education