Get reliable answers to your questions at Westonci.ca, where our knowledgeable community is always ready to help. Join our platform to connect with experts ready to provide precise answers to your questions in various areas. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

Write a python program that will accept monthly salary amounts greater than zero but less

than or equal to 400,000.00 until the user enters the character ‘e’. After the user

enters the character ‘e’, calculate the net pay of all salaries by deducting income tax at

a rate of 25%, pension of 5% and housing contribution of 2% from each salary

entered. Additionally, print the number of salaries that were entered in the program

along with the number of salaries that exceed 300,000.00



Sagot :

Answer:

b=0

c=0

lol=list()

while True:

   salary=input("Enter your salary: ")

   if salary=="e" or salary=="E":

       print("Thankyou!!")

       break

   else:

       a=int(salary)

       if a>=300000 and a<=400000:

            c=c+1

       if a<0 or a>400000:

           print("Your salary is either too small or too big ")

       if a>0 and a<=400000:

           a=a-(25/100*a)-(5/100*a)-(2/100*a)

           lol.append(a)

           b=b+1

           if a>=300000:

                c=c+1

print(lol)

print("The number of salaries entered is: "+ str(b))

print("The number of salaries that exceeded 300000 is: "+str(c))

View image Аноним