Advertisement
ninooooo

Untitled

Feb 6th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. def main():
  2. hours = [0, 8, 12, 0, 8]
  3.  
  4. print("Welcome to the Payroll Calculator!")
  5. first_name = input("Please enter first name:")
  6. last_name = input("Please enter last name:")
  7. sat_hours = float(input("Please enter hours worked Saturday:"))
  8. wage = float(input("Please enter the hourly wage:"))
  9.  
  10. employee_name = first_name, last_name
  11. hours_count = hours.count(0)
  12. total = (len(hours) - hours_count) + 1
  13. total1 = 0
  14. for element in range(0, len(hours)):
  15. total1 += int(hours[element])
  16. gross = (sat_hours + total1) * wage
  17.  
  18. print("Employee Name:", employee_name)
  19. print("Gross pay: $", format(gross, '.2f'))
  20. print("Total days worked:", total)
  21.  
  22. cmd = input('Press enter to quit.')
  23.  
  24.  
  25. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement