Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Issues with partitioning data

a = 100 b = 10 p = prime_range(a)

for j in range(a/b): fn[j] = [(i,val) for i,val in enumerate(p) if jb < p[i] < (j+1)b];

My code is able to partition prime numbers up to 100 in decades, but when I try to increase the prime range limit, or increase the partition then the code breaks. I am not sure why that happens? Could it be the if statement?

Issues with partitioning data

a = 100 b = 10 p = prime_range(a)

for j in range(a/b): fn[j] = [(i,val) for i,val in enumerate(p) if jj * b < p[i] < (j+1)(j+1) * b];

My code is able to partition prime numbers up to 100 in decades, but when I try to increase the prime range limit, or increase the partition then the code breaks. I am not sure why that happens? Could it be the if statement?

click to hide/show revision 3
None

Issues with partitioning data

Code:

a = 100
b = 10
p = prime_range(a)

prime_range(a)

for j in range(a/b): fn[j] = [(i,val) for i,val in enumerate(p) if j * b < p[i] < (j+1) * b];

b];

My code is able to partition prime numbers up to 100 in decades, but when I try to increase the prime range limit, or increase the partition then the code breaks. I am not sure why that happens? Could it be the if statement?