Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Here are the functions to compute the state and county sales tax def statesalestaxamount ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started