Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- hours = raw_input("How many hours?\n")
- rate = raw_input("What is the rate?\n")
- try:
- if hours <= 40:
- print hours * rate
- elif hours > 40:
- calc = (40 * 10) + ((hours - 40) * (1.5 * rate))
- print "Your pay will be " + str(calc) + " for this week\n"
- break
- except:
- print "Please enter a valid input"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement