Question: Write functions that will compute the state and county sales tax. Assume the state sales tax is 5 percent and the county sales tax


Write functions that will compute the state and county sales tax. Assume

Write functions that will compute the state and county sales tax. Assume the state sales tax is 5 percent and the county sales tax is 2.5 percent. Each function should return the amount of sales tax, when passed the amount of the sale. (Return a float rounded to 2 decimal places). Hint: Use the value 0.025 to represent 2.5 percent, and 0.05 to represent 5 percent. For example: Test Result print (calcState Tax (25) + calcCounty Tax (25)) 1.87 Answer: (penalty regime: 0, 0, 10, 20, ... % Reset answer 1 def calcState Tax(purchase): 2 # Calculate the state tax 23456 5 def calcCounty Tax (purchase): # Calculate the county tax

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here are the functions to compute the state and county sales tax def statesalestaxamount ... View full answer

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!