$29
Tasks
1. P2-32
2. P2-35 (Graduate students only. Refer to the program ch02/how_to_1/vending.py in your text book)
3. Write a Python program to print the sample receipt shown on the following page:
a. Use short item names
b. Item prices should be between $100.01 & $999.99
c. Calculate and print sales tax amount based on a 7% tax rate
d. Total is the sum of subtotal and sales tax
e. Assume customers pay cash and an amount higher than the subtotal. Also assume that the customer uses a combination of only $100, $50, and $20 bills
f. Calculate and print the amount to be returned to customer
g. Use the format specifiers that were used in class programs
What to Turn-In?
In ONE Word document, copy & paste on separate pages
1. Python code
2. The output of programs (screen snip will suffice)
Program Format
1. Leave plenty of blank lines in program for readability
2. Have plenty of comments
Word Document
1. Homework # and Date at top
2. Text headers as appropriate
3. Single-space, please (especially the code)
4. Click “Remove Space After Paragraph” (see below)
5. Page number bottom-middle
Output Format: Receipt
SAMPLE RECEIPT
5 ITEMS PURCHASED
______________________________________
Item 1
$ ___.__
Item 2
$ ___.__
Item 3
$ ___.__
Item 4
$ ___.__
Item 5
$ ___.__
Subtotal
$ ___.__
Tax - 7%
$ ___.__
Total
$ ___.__
Customer Paid
$ ___.__
Change to customer, if any
$ ___.__