Question
Python help with loops please Using For.. loop, Write a program to fetch the name, salary and the state for 6 employees. Calculate the federal
Python help with loops please
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.
def main(): salary = float(input('Enter salary: ')) federal_tax = 0.1 * salary
if salary > 100000: federal_tax = 0.20 * salary else: federal_tax = 0.15 * salary
state_tax = 0.10 * salary
So far have this..
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started