Write code in python to read Total income(annual income) of an employee and calculate
and display the income tax paid by him on basis of following criteria.
[ use if-elif-else construct ]
Taxable income slabs
(ANNUAL SALARY)
Income tax rates
Up to Rs 2.5 lakh Nil
Rs 2,50,001 to Rs
5,00,000
5% of (Total income minus
Rs 2,50,000)
Rs 5,00,001 to Rs
10,00,000
Rs 12,500 + 20% of
(Total income minus Rs
5,00,000)
Rs 10,00,001 and above
Rs 1,12,500 + 30% of
(Total income minus Rs
10,00,000)
*****************************************************
Answers
Answered by
0
Answer:
Python program to count the
# number of lines in a text file
# Opening a file
file = open("gfg.txt","r")
Counter = 0
# Reading from file
Content = file.read()
CoList = Content.split("\n")
for i in CoList:
if i:
Counter += 1
print("This is the number of lines in the file")
print(Counter)
Output:
This is the number of lines in the file
4
Similar questions