This program is used to calculate tax in the Python programming language.
This Tax calculating algorithm is very in this program we can improve this algorithm a lot.
Note: this is a very basic implementation of tax calculation. One should not use this to calculate the real tax to submit in real life, this is just a simulator for practice purposes.
Algorithm
First, we are asking for user input to get the total income and total saving, then we are checking for total taxable income by reducing savings from total_income. Then we are checking for various checks for tax bands.
Implementation:
#code
#Tax calculating program in python
#By Rahul Rajput
total\_income=int(input("Please enter you total income: "))
print("700000")
total\_saving=int(input("Please enter you total saving: "))
print("50000")
tax\_exemption\_limit=500000
tax\_10\_percent=750000
tax\_20\_percent=1000000
tax\_30\_percent=1250000
total\_taxable\_income=total\_income - total\_saving
tax=0.0
if total\_taxable\_income <= tax\_exemption\_limit :
print("You are not earning enough please work hard!!! (<!>)")
elif total\_taxable\_income <= tax\_10\_percent:
tax = (total\_taxable\_income - tax\_exemption\_limit) / 10.0
elif total\_taxable\_income <= tax\_20\_percent:
tax = (total\_taxable\_income - tax\_exemption\_limit) / 5.0
elif total\_taxable\_income <= tax\_30\_percent:
tax = ((total\_taxable\_income - tax\_exemption\_limit) \* 3 )/ 10.0
else:
tax = ((total\_taxable\_income - tax\_exemption\_limit) \* 3 )/ 10.0
print("Total calculated tax is " + str(tax))
Output
Sample output of this program
Thanks for being here.
check bubble sort in python click here