The document contains code to calculate income tax owed based on annual income. It prompts the user to enter their annual income, defines tax slabs as dictionary with percentages, and uses if/elif statements to check the income against thresholds to determine the applicable tax slab percentage and calculate approximate tax amount. The code then prints the results and requests re-running to check again.
The document contains code to calculate income tax owed based on annual income. It prompts the user to enter their annual income, defines tax slabs as dictionary with percentages, and uses if/elif statements to check the income against thresholds to determine the applicable tax slab percentage and calculate approximate tax amount. The code then prints the results and requests re-running to check again.
The document contains code to calculate income tax owed based on annual income. It prompts the user to enter their annual income, defines tax slabs as dictionary with percentages, and uses if/elif statements to check the income against thresholds to determine the applicable tax slab percentage and calculate approximate tax amount. The code then prints the results and requests re-running to check again.
print('you wont have to pay income tax as your income is less than25000') elif (income>=250001) and (income<=500000): print('your tax slab is {}% and approx amount would be {}'.format(tax_slabs['slab2'],(tax_slabs['slab2']*income)/100)) elif (income>=500001) and (income<=750000): print('your tax slab is {}% and approx amount would be {}'.format(tax_slabs['slab3'],(tax_slabs['slab3']*income)/100)) elif (income>=750001) and (income<=100000): print('your tax slab is {}% and approx amount would be {}'.format(tax_slabs['slab4'],(tax_slabs['slab4']*income)/100)) elif (income>=1000001) and (income<=1250000): print('your tax slab is {}% and approx amount would be {}'.format(tax_slabs['slab5'],(tax_slabs['slab5']*income)/100)) elif (income>=1250001) and (income<=1500000): print('your tax slab is {}% and approx amount would be {}'.format(tax_slabs['slab6'],(tax_slabs['slab6']*income)/100)) elif (income>1500000): print('your tax slab is {}% and approx amount would be {}'.format(tax_slabs['slab7'],(tax_slabs['slab7']*income)/100))