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
Asked Oct 5, 2019
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

Expert Answer

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

Check out a sample Q&A here.

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

Engineering

Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

Q: Provide a situation that encompasses Availability in the CIA triad

A: Answer:Situation of Availability:Availability comes under the C.I.A (Confidentiality Integrity Avail...

question_answer

Q: What is the mantissa and exponent values if 6.75 is represented in 8 bit binary floating point repre...

A: Answer:Conversion of decimal to 8-bit floating point representation:Step1: convert the integer part ...

question_answer

Q: program5_1.pyWrite a program that uses a custom function to generate a specified number of random in...

A: Program AlgorithmIn the main function, take the input from the user asking for the number of random ...

question_answer

Q: In a file called SkipMultiples.java, write a program write a program satisfying these specs: It ask...

A: // This JAVA program takes 2 inputs from user, namely low and high. // and prints all integers start...

question_answer

Q: The code you will need for this assignment is here (in C file)   /* YOUR NAME HERE* CSCI 4100* Progr...

A: C shell is a type of command processor which enables user to write and modify commands .It can also ...

question_answer

Q: I can't figure this one out for the life of me. I've been stuck on it for 4 hours now... HELP! The p...

A: import re inputs = 0numbers_sum = 0 # enter the stringstring = input('Enter a string: ') # condition...

question_answer

Q: Write a program in Java Eclipse that does the following:a) create a 2D Ragged array with columns and...

A: Create a Main class and all required methods to print Ragged array elements. And create all methods ...

question_answer

Q: Please write Lisp code for the following problem. Consider the list:((name (number1 nation)) (MusicP...

A: Instructions to create a function to access the MovieTixHighPrices value using car and cdr:The funct...

question_answer

Q: Write down a Unix command that will add the contents of a file named file1.txt and a file named file...

A: To add the content from one file to another file we use “cat” command in Unix.