ok

mail@pastecode.io avatar
unknown
python
2 years ago
1.1 kB
1
Indexable
Never
# 03.02.05
hours = int(input("Please enter the amount of hours worked this week"))
pay = float(input("Please enter your hourly rate of pay"))
exempt = input("Are you exempt? Enter Yes or No")
if exempt == "Yes":
  if hours <= 40:
    pay_week = round(hours*pay, 2)
    print("You have gotten payed $", pay_week)
    print("No Taxes Deducted")
  else:
    overtime = hours - 40
    pay_week = (hours- overtime)*pay
    pay_overtime = overtime * pay * 1.5
    print("You have gotten payed $", round(pay_overtime +           pay_week, 2))
    print("No Taxes Deducted")
elif exempt == "No":   
  if hours <= 40:
    pay_week = round(hours*pay, 2)
    tax_deduction = pay_week - (pay_week * 0.18)
    print("You have gotten payed $", tax_deduction)
    print("Not Exempt")
  else:
    overtime = hours - 40
    pay_week = (hours- overtime)*pay
    pay_overtime = overtime * pay * 1.5
    tax_deduction = (pay_week + pay_overtime) - ((pay_week + pay_overtime) * 0.18)
    print("You have gotten payed $", round(tax_deduction, 2))
    print("Not Exempt")
else:
  print("Invalid Choice")