Homework #2 Solution

$29.99 $18.99

Tasks P2-32 P2-35 (Graduate students only. Refer to the program ch02/how_to_1/vending.py in your text book) Write a Python program to print the sample receipt shown on the following page: Use short item names Item prices should be between $100.01 & $999.99 Calculate and print sales tax amount based on a 7% tax rate Total is…

You’ll get a: . zip file solution

 

 
Categorys:
Tags:

Description

Rate this product

Tasks

  1. P2-32
  1. P2-35 (Graduate students only. Refer to the program ch02/how_to_1/vending.py in your text book)
  1. Write a Python program to print the sample receipt shown on the following page:
  1. Use short item names
  2. Item prices should be between $100.01 & $999.99
  3. Calculate and print sales tax amount based on a 7% tax rate
  4. Total is the sum of subtotal and sales tax
  5. 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
  6. Calculate and print the amount to be returned to customer
  7. 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

Amounts align to the right

Receipt Header

SAMPLE RECEIPT

5 ITEMS PURCHASED

______________________________________

Item names align to the left

Labels align to the right

Item 1

$ ___.__

Item 2

$ ___.__

Item 3

$ ___.__

Item 4

$ ___.__

Item 5

$ ___.__

Subtotal

$ ___.__

Tax – 7%

$ ___.__

Total

$ ___.__

Customer Paid

$ ___.__

Change to customer, if any

$ ___.__