Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
