Reference no: EM132356485
Question
Please program these program in python
Program 1.
Gross Pay
Write a program
to fetch employee name and the salary. Calculate the Federal tax and state tax based on the following criteria:
If the salary is greater than 100000 then calculate the federal tax at 20% otherwise calculate the federal tax at 15%
Calculate the state tax at 5%
Calculate the net salary of the employee. To calculate the net salary, subtract federal and state tax from the gross salary.
Program 2.
Write a program to:
Ask the student for 3 exam scores.
Calculate the average score.
Using a bunch of IF conditions, the computer should determine the grade and display the grade to the user. Use the following Criteria:
If Average >= 90... Assign the grade "A"
If Average >=80 and Average<90 then assign the grade "B"
If Average>=70 and Average< 80 then assign the grade "C"
If Average is less than 70, assign grade "F"
Display the grade back to the student.
Program 3
Using For.. loop, Write a program to fetch the name, salary and the state for 6 employees. Calculate the federal tax, state tax and the net salary for each employee. Use the following criteria:
To calculate the federal tax, use the following criteria:
If the salary is greater than 100,000 then calculate the federal tax at 20 percent.
Otherwise calculate the federal tax at 15%.
To calculate the state Tax, use the following criteria:
If the employee is from CA, NV, AZ, or WA calculate the state tax at 10%
Otherwise calculate the state tax at 12%
Calculate and display the netsalary.
Hint1: You can use the For loop.
Hint2: Each time the computer goes through the loop, it asks for the name, gross salary and state of one employee. It then calculates the salary of this one employee. Repeat for the 6 times as defined in for loop.
Hint3: Modify code you used in previous projects
Program 4
Write a program that sums the integers from 1 through a number entered by the user. A while loop is used to validate the user input to make sure the number is greater than one.
A for loop is used to sum the numbers.