10.Write a Python program to calculate tax – GST / Income Tax.

Solution :- 

Static :- 

cost = 15000
gstper = 5
gst = cost * gstper/100
amount = cost + gst
print(“GST is :- “,gst)
print(“Amount to Pay is :- “,amount)

# Income Tax
income = 350000
if income <20000:
tax = 0
elif income <400000:
tax = (income-200000)*0.05
elif income <800000:
tax = (income-400000)*0.07 + 10000
else :
tax = (income-800000)*0.1 +38000
print(“Income Tax to pay”,tax)

Output :- 

 

Dynamic :-  

cost = float(input(“Enter cost of the product/service:- “))
gstper = float(input(“Enter the % charged for gst :- “))
gst = cost * gstper/100
amount = cost + gst
print(“GST is :- “,gst)
print(“Amount to Pay is :- “,amount)

# Income Tax
income = float(input(“Enter total annual income :- “))
if income <20000:
tax = 0
elif income <400000:
tax = (income-200000)*0.05
elif income <800000:
tax = (income-400000)*0.07 + 10000
else :
tax = (income-800000)*0.1 +38000
print(“Income Tax to pay”,tax)

 

Output :-