# program3_1.pyShipping is free for online orders totaling \$25 or more at Mississippi.com. Orders less than \$25 are charged \$6.00 for shipping. 7% sales tax is added for items that are taxable. A shopper is ordering one item, but possibly in multiple quantities. Write a program that prompts for the unit price of the item and the quantity desired. The program should also ask if the item is taxable and clearly indicate how the shopper should reply. Finally, the program should display a four line receipt that shows the extended price (subtotal) of the purchase, sales tax, shipping cost, and total amount due. All amounts should be in currency format as described in the requirements above,

Question
213 views

program3_1.py
Shipping is free for online orders totaling \$25 or more at Mississippi.com. Orders less than \$25 are charged \$6.00 for shipping. 7% sales tax is added for items that are taxable. A shopper is ordering one item, but possibly in multiple quantities. Write a program that prompts for the unit price of the item and the quantity desired. The program should also ask if the item is taxable and clearly indicate how the shopper should reply. Finally, the program should display a four line receipt that shows the extended price (subtotal) of the purchase, sales tax, shipping cost, and total amount due. All amounts should be in currency format as described in the requirements above,

check_circle

Step 1

round() function is used to round the number.

Syntax of round function:

round(number [, ndigit])

number is first argument of round of where number that is to rounded.

ndigit is second argument used for number of precision point.

sep argument is used to separate two values on the basis of “ ”, “_”, “-” etc.

Step 2

Program:

unitcost=float(input("Enter the unit price of item: "))

quantity=int(input("Enter the quantity: "))

shippingcost=0

salestax=0

subtotal=unitcost*quantity

if(subtotal<25):

print("This subtotal amount is 7% taxable")

salestax=subtotal*0.07

shippingcost=6

else:

salestax=0

totalamount=subtotal+salestax+shipping...

### Want to see the full answer?

See Solution

#### Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in