I was wondering how I could set up a loop for the following code that will exit the loop when the person types done. Would the while command work to do that?
def hours(): hours = input("How many hours did they work?: ") return hours def payrate(): payrate = input("How much is their payrate?: ") return payrate def calchours(pr, h): if h > 40: rh = 40 oh = h - 40 if h > 60: print "Can't exceed 60 hours in a week!" else: rh = h oh = 0 def main(): hrs = hours() pyr = payrate() calchours (pyr, hrs) main()