Question: program that will ask the user to interactively enter a customer's name and the amount of a purchase.Customers get a 12% discount if the purchase

program that will ask the user to interactively enter a customer's name and the amount of a purchase.Customers get a 12% discount if the purchase amount exceeds $1,000.The program should then compute the state and county sales tax.Assume the state sales tax is 5% and the county sales tax is 2.5%.The program should display the amount of the purchase, the discount amount, the net 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 net amount of purchase and the total sales tax).Taxes are based on the net amount after discounts are applied.

Output Format

Customer - xxxxxxxxxxxxxxxx

Amount of purchase - $#,###.##

Discount - $###.##

Net amount after discount - $#,###.##

State sales tax - $#,###.##

County sales tax - $#,###.##

Total sales tax - $#,###.##

Total sales amount - $#,###.##

The program should look like the example below

def main():

# define constants

# get input data

# perform processing operations

# format program output

amount_of_purchase_out = format(amount_of_purchase, ',.2f')

state_sales_tax_out = format(state_sales_tax, ',.2f')

county_sales_tax_out = format(county_sales_tax, ',.2f')

total_sales_tax_out = format(total_sales_tax, ',.2f')

total_sales_amount_out = format(total_sales_amount, ',.2f')

# print program output

print()

print ("Customer - ", customer)

print ("Amount of purchase - $", amount_of_purchase_out)

print ("State sales tax - $", state_sales_tax_out)

print ("County sales tax - $", county_sales_tax_out)

print ("Total sales tax - $", total_sales_tax_out)

print ("Total sales amount - $", total_sales_amount_out)

print()

main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!