Income Tax

Income Tax

Write a Python program to calculate and display the income tax of an individual by giving his/her age and annual income. Refer to the INCOME TAX SLAB given below and code accordingly. 

 INCOME TAX SLAB:

Age <=60 and income<= 2, 50,000/     :    0% tax

Age <=60  and income>2,50,000  and income<=  5,00,000    :    10% tax

Age <=60  and income>5,00,000  and income<=  10,00,000   :    20% tax

Age <=60  and income    above 10, 00,000/-         :    30% tax

.

Age >60 and age<=80  , income<= 3, 00,000/     :    0% tax

Age >60 and age<=80 ,  income > 3,00,000 and income <=5,00,000 :10% tax

Age >60 and age<=80 ,  income > 5,00,000 and income <=10,00,000 :    20% tax

Age >60 and age<=80 ,  income>10,00,000 : 30% tax

.

Age >80 and income<= 5, 00,000/     :    0% tax

Age >80 ,  income > 5,00,000 and income <=10,00,000 : 20% tax

Age >80  and age<=100,  income >10,00,000 : 30% tax.

Note:

  • If the age entered by the user is below 18 and above 100, then, display  the message “Invalid Age” and stop the program.
  • If the income entered by the user is a negative number, then, display the message ” Invalid Income ” and stop the program.

Sample Input 1:

Enter the age:

50

Enter the income:

250000

Sample Output 1:

The Tax amount is: 0.00

Sample Input 2:

Enter the age:

40

Enter the income:

500000

Sample Output 2:

The Tax amount is: 50000.00

Sample Input 3:

Enter the age:

17

Sample Output 3:

Invalid Age

Sample Input 4:

Enter the age:

40

Enter the income:

-500000

Sample Output 4:Invalid Income

Code :-

age=int(input("Enter the age:\n"))
tax=0
if age>18 and age<=100:
    income=int(input("Enter the income:\n"))
    if income>0:
        if age<=60:
            if income<=250000:
                tax=(income*0)/100
            elif income>250000 and income<=500000:
                tax=(income*10)/100
            elif income>500000 and income<=1000000:
                tax=(income*20)/100
            elif income>1000000:
                tax=(income*30)/100
        elif age>60 and age<=80: 
            if income<=300000:
                tax=(income*0)/100
            elif income>300000 and income<=500000:
                tax=(income*10)/100
            elif income>500000 and income<=1000000:
                tax=(income*20)/100
            elif income>1000000:
                tax=(income*30)/100
        elif age>80 :
            if income<=500000:
                tax=(income*0)/100
            elif income >500000 and income<=1000000:
                tax=(income*20)/100
            elif income>1000000:
                tax=(income*30)/100
        print("The Tax amount is: %.2f" % tax)
    else:
        print("Invalid Income")
else:
    print("Invalid Age")
    
        

5 thoughts on “Income Tax”

  1. The subsequent time I read a weblog, I hope that it doesnt disappoint me as much as this one. I imply, I know it was my option to read, but I actually thought youd have something fascinating to say. All I hear is a bunch of whining about one thing that you could fix if you happen to werent too busy searching for attention.

  2. Hey! I know this is kinda off topic nevertheless I’d figured I’d ask. Would you be interested in exchanging links or maybe guest writing a blog post or vice-versa? My site goes over a lot of the same subjects as yours and I think we could greatly benefit from each other. If you might be interested feel free to shoot me an email. I look forward to hearing from you! Wonderful blog by the way!

  3. This unbound GTA 5 Online Author takes of a programming damage in the job that allows for unlimited adding
    of uncommitted GTA 5 Money and RP on users accounts.

Leave a Comment

Your email address will not be published. Required fields are marked *

x