On 23/04/13 02:47, Jim Mooney wrote:
Okay, what am I doing wrong here?
primeList = [1]
numList = list(range(2,101))
for e in numList:
for f in primeList:
if numList[e] % primeList[f] != 0: #list index out of range
for lops in Python do not generate indexes they return the actual
ent
On 04/22/2013 09:47 PM, Jim Mooney wrote:
Okay, what am I doing wrong here? I'm generating primes from a list
and getting "list index out of range," but since the for loops
controls the indexes I don't see how that's happening. I thought it
was the list append, but I commented that out and put in
On 04/22/2013 09:47 PM, Jim Mooney wrote:
Okay, what am I doing wrong here? I'm generating primes from a list
and getting "list index out of range," but since the for loops
controls the indexes I don't see how that's happening. I thought it
was the list append, but I commented that out and put in
Okay, what am I doing wrong here? I'm generating primes from a list
and getting "list index out of range," but since the for loops
controls the indexes I don't see how that's happening. I thought it
was the list append, but I commented that out and put in a print
statement, and I still got the line