[melbourne-pug] Python, VB math simple problem

brucedecoy-post at yahoo.com.au brucedecoy-post at yahoo.com.au
Sun Apr 2 13:26:52 CEST 2006


I'm not convinced I understand your spec., but here's
an attempt.
You will need to do some testing and tweaking.

BTW, are you aware of the imminent Python 2.5
licensing change?
http://pyfound.blogspot.com/2006/04/python-25-licensing-change.html

HTH,
Bruce

---------------8<------------------
#!/usr/local/bin/python

import sys

x = int(sys.argv[1])
denom = int(sys.argv[2])

y = int(10000*((x % denom) / float(denom)))
w = x / denom
z = (w%10)+1
a = (z % denom) / float(denom)

print "%sL %s" % (y, a)



	

	
		
____________________________________________________ 
On Yahoo!7 
Messenger - Make free PC-to-PC calls to your friends overseas. 
http://au.messenger.yahoo.com 



More information about the melbourne-pug mailing list