In: Computer Science
Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales 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) with proper formatting. (25 pts)
python
code:
pur_amount = float(input("Enter purchase amount: ")) #taking input from user
cou_tax = pur_amount*0.025
#calculating country tax
state_tax = pur_amount*0.05 #calculating state
tax
total_tax = cou_tax + state_tax #calculating total
tax
total_purc = total_tax + pur_amount # calculating total of sale
# Displaying outputs
print("Amount of purchase = ",pur_amount)
print("State sales tax = ",state_tax)
print("Country sales tax = ",cou_tax)
print("Total sales tax = ",total_tax)
print("Total of sale =
",total_purc)
OUTPUT