Calculate pay with overtime
hours = raw_input('Enter hours:') rate = raw_input('Enter rate:') if hours > 40 : print (hours * rate) + ((hours - 40) * (rate * .5)) else : print hours * rate