Kinda newb-ish question

Michael T. Babcock mbabcock at fibrespeed.net
Fri Dec 12 12:13:01 EST 2003


python-list-request at python.org wrote:

>x=1
>while 1==1:
>    x=x+1
>    y=range(1,x)
>    z=0
>    q=9
>    for count in y:
>        q=x%y
>        if q==0:
>            z=z+1
>  
>

y is a range, you defined it earlier.  count is the current item in y 
for any given loop, so you probably wanted to say q = x % count.  Right?

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock







More information about the Python-list mailing list