Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. while True:
  2. hours = raw_input("How many hours?\n")
  3. rate = raw_input("What is the rate?\n")
  4. try:
  5. if hours <= 40:
  6. print hours * rate
  7.  
  8. elif hours > 40:
  9. calc = (40 * 10) + ((hours - 40) * (1.5 * rate))
  10. print "Your pay will be " + str(calc) + " for this week\n"
  11. break
  12. except:
  13. print "Please enter a valid input"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement