Good Evening Friends, I hope outside code is allowed on this forum.As for coding practice I am trying to make a programme for tax calculation.But it is not working. Following is the code for my programme
#Tax-Calc # In come tax calculation def calculate_tax(income): if (income < 300000): tax =(0) #nil tax elif(income > 300001) and (income < 500000): tax = (0.1 * (300000 - income)) elif(income > 500001) and (income < 1000000): tax = (0.2 * (1000000 - 300000 - income)) elif (income > 1000001): tax = (0.3 * (1000001 - 300000 - income)) else: pass x = float(input("Enter Income :")) print (calculate_tax (x))
I am coding this on python 3.5.When ever I run the programme I get "None" result. Can you point my mistake.