kaitkxoxo2586 kaitkxoxo2586
  • 29-01-2020
  • Computers and Technology
contestada

write an algorithm that gets two values: the price for item A and the quantity purchased. The algorithm should then print the total cost and the total cost plus an 8% sales tax.

Respuesta :

dayanandghelaro
dayanandghelaro dayanandghelaro
  • 30-01-2020

Answer:

Explanation:

price = eval(input("price of item: "))

quantity = eval(input("quantity of item: "))

sales_tax = 0.08 # 8% sales tax

total_cost = price*quantity

total_cost_with_tax = total_cost + total_cost*sales_tax

print("total cost: "+str(total_cost))

print("total cost + 8% sales tax: "+str(total_cost_with_tax))

Ver imagen dayanandghelaro
Answer Link

Otras preguntas

what is a recommended position for the victim when performing cpr
glands of skin that mainly secretes oil?a. sudoriferousb. sweatc. sebaceous d. a and be. b and c
1.In a famous science fiction movie, a group of scientists in a submarine are miniaturized and injected into a patient's bloodstream. Their mission is to travel
Select the temporal transition that would be best to show suspense. "with reference to..." "in the distance..." "in the same way..." "all of a sudden..."
how did the french revolution affect women
What is the Octet rule?
PLEASE HELP i need some ideas on a short story it has to be include conflict, rising action, resolution, ect. it must not end with death, or a dream, it cannot
Rosa spent .4 of her money on videos and Albert spent 1/2 of his money on videos. who spent more money and write an inequality.
what were early north america cultures known for
a student runs 4km in 30 minutes at a steady pace . what is the students average speed in km/hr