Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Define a function named tax_version2 which accepts an argument for income and re

ID: 3689466 • Letter: D

Question

Define a function named tax_version2 which accepts an argument for income and returns the tax on that income assuming different tax brackets. The tax brackets (and rates) are: rate of 10% for income between $50,000 and $100,000 (inclusive of both limits) rate of 25% for income between $100,000 and $200,000 (inclusive of upper limit) rate of 35% for any income above $200,000 rate of 0% for any income not covered by the ranges given above Sample function calls - >>> tax_version2(49001) 0.0 >>> tax_version2(55500) 5550.0 >>>tax_version2 (100001) 25000.25

Explanation / Answer

Code:

def tax_version2(income):
   if income>=50000 and income<=100000:
       return income*0.1
   elif income>100000 and income<=200000:
       return income*0.25
   elif income>200000:
       return income*0.35
   else:
       return 0.0;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote