[EMAIL PROTECTED] wrote: > On Aug 20, 11:06 am, [EMAIL PROTECTED] wrote: > >>On Aug 20, 9:58 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> >>>On 8/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >>>>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. >> >>>>def calc(num): >>>> if num < 23: >>>> return 0.4 * num >>>> else: >>>> overtime = num - 22 >>>> x = 0.4 * 22 >>>> x += overtime * 1.4 >>>> return x >> >>>># Use your own brain next time >> >>>>Mike >> >>>>-- >>>>http://mail.python.org/mailman/listinfo/python-list >> >>>Mike, >> >>>I wonder if we were both just duped into helping someone with their >>>homework... >> >>>Shawn >> >>I like to write code, so it's not a big deal when it's something so >>simple. Still, that is beyond dumb! Nice code, by the way. >> >>Mike- Hide quoted text - >> >>- Show quoted text - > > > Thanks for the help. By the way I am trying to learn the python after > work and on weekends. If it was a dumb question, to this group, I will > not bother you all again. > Without help it will take me longer to learn. Thanks >
Throw out an example of what you tried with an error message and/or unexpected results. Ask particulars--this will keep you from giving truck drivers a bad name. Sticking-my-fist-out-window-and-making-pulling-down-gesture-ly yours, James -- James Stroud UCLA-DOE Institute for Genomics and Proteomics Box 951570 Los Angeles, CA 90095 http://www.jamesstroud.com/ -- http://mail.python.org/mailman/listinfo/python-list