1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marin [14]
3 years ago
8

Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county s

ales tax. Assume the state sales tax is 5 percent and the county sales tax is 2.5 percent. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the total sales tax). Hint: Use the value 0.025 to represent 2.5 percent, and 0.05 to represent 5 percent. Miles-per-Gallon
Computers and Technology
1 answer:
iVinArrow [24]3 years ago
7 0

Answer:

purchase_amount = float(input("Enter the amount of a purchase: "))

state_sales_tax = purchase_amount * 0.05

country_sales_tax = purchase_amount * 0.025

print("The amount of the purchase is " + str(purchase_amount))

print("The state sales tax is " + str(state_sales_tax))

print("The county sales tax is " + str(country_sales_tax))

print("The total sales tax is " + str(state_sales_tax + country_sales_tax))

print("The total of the sale is " + str(purchase_amount + state_sales_tax + country_sales_tax))

Explanation:

*The code is in Python.

Ask the user to enter purchase amount

Calculate the state sales tax, multiply purchase amount by 0.05

Calculate the county sales tax, multiply purchase amount by 0.025

Calculate the total sales tax, sum the state sales tax and county sales tax

Print the amount of the purchase, state sales tax, county sales tax, total sales tax and  total of the sale

You might be interested in
What is cryptocurrency ? I need to do a research one it please help!
icang [17]

A cryptocurrency is a digital asset designed to work as a medium of exchange that uses strong cryptography to secure financial transactions, control the creation of additional units, and verify the transfer of assets.

8 0
3 years ago
In which state of matter is there no particle motion?
kiruha [24]
Solid is your answer for the day
6 0
3 years ago
How many bytes make up the word panthers
Sati [7]
It is saying 8 bytes
6 0
3 years ago
What does a driver do?
kompoz [17]
A driver is a piece of software that allows things such as a keyboard, mouse, hard drive, etc. connect to a computer. Normally found on the manufactures website, you can update drivers with advanced and modern technology. Or, if a device is really old you can download a driver to allow that device to connect to a PC.
6 0
3 years ago
Can someone please help???
Ksivusya [100]

Answer:

Look it up

Explanation:

You don’t need to buy another

8 0
2 years ago
Other questions:
  • What feature did the 32X add to the Sega Genesis?
    13·1 answer
  • What is an input, output and storage device?
    12·1 answer
  • A check list should be based on that apply to your industry.
    11·2 answers
  • How to get out of compatibility mode in word?
    15·1 answer
  • Jake was working on an essay for his English class on a stormy Sunday afternoon. Before he could save his document, a big strike
    8·1 answer
  • Aspiring graphic designers can earn a(n) certification for graphic design software, such as Photoshop and Acrobat.
    9·2 answers
  • Hello 10 points if my Chromebook is on 26 percent how much time do I have left theoretically
    8·2 answers
  • Can someone tell me how to fix the keyboard on ipad?- its in the middle of my screen andd i dont know how to do it
    13·1 answer
  • Another term for the plot structure of the hero journey
    13·1 answer
  • Please help with this question
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!