Answer: yearly_income = float(input("Enter yearly income: "))
if yearly_income < 40000:
STANDARD_DEDUCTION = 10000
tax_rate = 0.2
else:
STANDARD_DEDUCTION = 8000
tax_rate = 0.3
taxable_income = yearly_income - STANDARD_DEDUCTION
income_tax = taxable_income * tax_rate
print("Income tax is $%.1f." % income_tax)
Step-by-step explanation: