[python-win32] Newbee question

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Mon Aug 20 23:11:34 CEST 2007


RANDALL HOWELL schreef:
> I am trying to figure out how to code my stop pay. I
> get paid 40 cents a stop for the first 22 stops, and
> $1.40 for stops after that. 
> stops = 24
> if stops < 22:
>     stopPay = stops * .4
> else: 
>     stopPay = stops * 1.4
> print stopPay
>>>> 33.6
> well thats not how I get paid, I get paid $8.80 for
> the first 22 stops + $2.80 for the last 2 stops. I
> know this is a elementary question, but it has got me
> stuck. Thanks

Exactly the same question has been asked and answered earlier today on 
the comp.lang.python newsgroup. You can follow the discussion here:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/a4defd225a9d5b32/3e821369c667c0c3#3e821369c667c0c3

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the python-win32 mailing list