Answered step by step
Verified Expert Solution
Question
1 Approved Answer
code Text Copy to Dive E 1 2 . In the United States of Pretendistan, income is taxed as follows: ifyour income it at most
code
Text
Copy to Dive
E In the United States of Pretendistan, income is taxed as follows:
ifyour income it at most $ per year, you pay of your total income as tax
otherwise, you pay of your total income as tax
Complete the function computetas that uses an ifstatement to compute and return the total tax due for the salary stored in the argument named salasy. Test your code on incomes of $return value should be $ and $return value should be $
defcompute taxsalary:
# write your code here
# Call your function with an argument of
I # Call your function with an argument of
What happens if you provide a negative value for salary? Make a copy of your compute tax function below and modify it so that the function to retum if calay is negative. Hint use the frelifeelse structure.
E Now call your revised function with the same test cases as before and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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