beginner in python
km
srikrishnamohan at gmail.com
Thu Aug 2 03:51:10 EDT 2007
Hi
Welcome to python !
there a a few suggestions in ur code which is a good practice to follow.
In the snippet:
> > for x in range(len(x_value)):
> > x_co = float(x_value[x])-float(x_value[x+1])
> > y_co = float(y_value[x])-float(y_value[x+1])
> > z_co = float(z_value[x])-float(z_value[x+1])
> > data = math.sqrt(x_co)*(x_co)+(y_co)*(y_co)+(z_co)*(z_co)
> > print data
U suddenly change the indent from four spaces which u followed in previous
for loop. pls maintain consistency in indent. Standard convention is to use
four spaces for indent.
Another problem is that u have not closed the filehandle in the program!
HTH
KM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070802/f22b2d54/attachment.html>
More information about the Python-list
mailing list