On Aug 20, 9:23 am, "HD1956" <[EMAIL PROTECTED]> wrote: > This is probably a simple code. I am a truck driver who gets paid by > stops and cases. I am trying to figure out how to code my stop pay. I > get 40 cents per stop up to 22 stops, and $1.40 per stops after that.
You'll get top marks for turning in the shortest program! norm = 0.4 ot = 1.4-norm otStart = 22 calcPay = lambda stops : norm*stops+ot*max(stops-otStart,0) -- Paul -- http://mail.python.org/mailman/listinfo/python-list