Printing a well formatted invoice Use three named "constants" for the following prices: Small beads have a price of 10.20 dollars per box. Medium beads have a price of 8.52 dollars per box. Large beads have a price of 7.98 dollars per box. Ask the user how many boxes of small beads, how many boxes of medium beads, and how many large beads they need (use the int Built-in Function to convert these values to int). Print the invoice in the following format: QTY COST PER BOX x.xx x.xx x.xx SIZE Small Medium Large TOTAL n n TOTALS xx.xx xx.xx xx.xx xxx.xx Replace the n and x placeholders with actual numeric data values. Right align all numeric values. All dollar amounts should have two decimal places and should align on the decimal point. Test your script twice, first with user input of 10 boxes of small beads, 9 boxes of medium beads, and 8 boxes of large beads, and then a second time with user input of 5 boxes of small beads, 10 boxes of medium beads, and 15 boxes of large beads. Add the following at the end of the script to show your results: Execution results: paste execution results here

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

PLease in python, Thank you.

 

**Printing a Well-Formatted Invoice**

Use three named "constants" for the following prices:
- Small beads have a price of 10.00 dollars per box.
- Medium beads have a price of 8.52 dollars per box.
- Large beads have a price of 7.98 dollars per box.

Ask the user how many boxes of small beads, how many boxes of medium beads, and how many large beads they need (use the int Built-in Function to convert these values to int).

Print the invoice in the following format:

```
SIZE     QTY     COST PER BOX     TOTALS
Small    n       x.xx             xx.xx
Medium   n       x.xx             xx.xx
Large    n       x.xx             xx.xx
TOTAL                      xxx.xx
```

Replace the n and x placeholders with actual numeric data values. Right align all numeric values. All dollar amounts should have two decimal places and should align on the decimal point.

Test your script twice, first with user input of 10 boxes of small beads, 9 boxes of medium beads, and 8 boxes of large beads, and then a second time with user input of 5 boxes of small beads, 10 boxes of medium beads, and 15 boxes of large beads.

Add the following at the end of the script to show your results:

```
...
Execution results:
paste execution results here
...
```
Transcribed Image Text:**Printing a Well-Formatted Invoice** Use three named "constants" for the following prices: - Small beads have a price of 10.00 dollars per box. - Medium beads have a price of 8.52 dollars per box. - Large beads have a price of 7.98 dollars per box. Ask the user how many boxes of small beads, how many boxes of medium beads, and how many large beads they need (use the int Built-in Function to convert these values to int). Print the invoice in the following format: ``` SIZE QTY COST PER BOX TOTALS Small n x.xx xx.xx Medium n x.xx xx.xx Large n x.xx xx.xx TOTAL xxx.xx ``` Replace the n and x placeholders with actual numeric data values. Right align all numeric values. All dollar amounts should have two decimal places and should align on the decimal point. Test your script twice, first with user input of 10 boxes of small beads, 9 boxes of medium beads, and 8 boxes of large beads, and then a second time with user input of 5 boxes of small beads, 10 boxes of medium beads, and 15 boxes of large beads. Add the following at the end of the script to show your results: ``` ... Execution results: paste execution results here ... ```
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
Types of Expressions
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