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]
4 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]4 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
After execution of the code fragment
lesya692 [45]
Yes the output is 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  





8 0
4 years ago
The moon is almost directly between the sun and earth
anastassius [24]
That's true for a few days out of a month ... a day or two before and after each New Moon. When it does actually get DIRECTLY between, that's when we get a solar eclipse.
3 0
3 years ago
Read 2 more answers
Which type of device allows you to give the computer information and ask it to perform tasks?
Anon25 [30]
Your answer is A, input device.
6 0
4 years ago
The critical path of a network is the A. shortest time path through the network. B. path with the most activities. C. longest ti
S_A_V [24]

Answer: Option [C] : The longest time path through the network.

Explanation:

The critical path of a network is the longest time path through the network.

8 0
3 years ago
In a selection structure, you perform an action or task, and then you perform the next action in orderIn a selection structure,
svetoff [14.1K]

ANSWER: FALSE

EXPLANATION:

5 0
3 years ago
Other questions:
  • 1.an electronic index of books A. web page
    12·1 answer
  • Jean-Ann works in the finance business. She analyzes insurance applications in order to determine the level of risk involved in
    11·1 answer
  • What OS is most commonly used by businesses? Linux Macintosh Microsoft Windows
    11·1 answer
  • After reviewing the various types of network connections available, a client chooses a network connection that is considered to
    13·1 answer
  • List three tacos there are several from the opening page of the help and support center.
    5·1 answer
  • Fallon is a new student on campus. Everywhere she goes, she is asked for her 12-digit student number. To memorize her new studen
    10·1 answer
  • Which fact does lean green eco machines present to show that electric cars are not perfect
    13·2 answers
  • Social media is an effective form of e-commerce. True False
    12·1 answer
  • The ‘capacity for emergency management and response personnel to interact and work well together’ describes which of the key com
    10·2 answers
  • In critical thinking, an argument is:
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!