Tax calculating program in Python

This program is used to calculate tax in the Python programming language.

main
Tax calculating Program in Python

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
 #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

Comments

Popular posts from this blog

C/C++ program to check the Palindrome string.

Second Equation of motion, How to implement using C language

Third Equation of motion, How to implement using C language