[python-win32] Newbee question

Pham, Hien Hien.Pham at tekelec.com
Tue Aug 21 14:57:54 CEST 2007


This is not a Python question - It is a Math problem:

Try this:

stops = 24
if stops <= 22:
    stopPay = stops * .4
else: 
    stopPay = 22 * 0.4 + (stops - 22) * 1.4
print stopPay
    
That will give you $11.60

Hope that help,

H. Pham

-----Original Message-----
From: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org] On Behalf Of RANDALL HOWELL
Sent: Monday, August 20, 2007 3:53 PM
To: python-win32 at python.org
Subject: [python-win32] Newbee question

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
_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32


More information about the python-win32 mailing list