ptmcg at austin.rr.com
Mon Aug 20 17:30:05 CEST 2007
On Aug 20, 9:23 am, "HD1956" <hd7... at hotmail.com> 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)
More information about the Python-list