#calculate the amout of tax due to the tax given income
def calTax( income ):
tax = 0
if income <25000:
tax = income * 0.25
elif income > 25000 and income < 50000:
tax = 25000 * 0.25 + (income - 25000) * 0.33
elif income > 50000:
tax = 25000 * 0.25 + 25000 * 0.33 + (income - 50000) * 0.5
return tax
def main ():
taxableIncome = int(raw_input("Enter taxable income: "))
governmentTake = calTax ( taxableIncome )
print "The tax on $%0.2f is $%0.2f" % (taxableIncome,governmentTake)
main()
Ive written this program but im not sure if it is calculating the tax properly.
Any help would be great