Answered step by step
Verified Expert Solution
Link Copied!

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


image

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Starting Out With Java From Control Structures Through Data Structures

Authors: Tony Gaddis

6th Edition

0133957055, 978-0133957051

More Books

Students also viewed these Programming questions

Question

How can a subclass method call an overridden superclass method?

Answered: 1 week ago