Re: [Tutor] Creatively solving math problems -----help
by Clay Shirky other posts by this author
Sep 11 2003 1:52PM messages near this date
[Tutor] Creatively solving math problems -----help
|
[Tutor] Re: [pygame] Fastest (x,y) distance calculation
> for x in range(20000):
> if [x%y for y in range(2, 7)] == 1 and x % 7 == 0:
> print x
This is awfully hard to read -- any reason you're trying to cram so much
stuff on one line? Is this what you are trying to do?
for x in range(20000):
for y in range(2, 7):
if x % y == 1 and x % 7 == 0:
print x
break
If so, it will be easy to start altering from there.
-clay
_______________________________________________
Tutor maillist - Tutor@[...].org
http://mail.python.org/mailman/listinfo/tutor
Thread:
Conrad Koziol
Clay Shirky
|