Commit 3469f0c7 authored by sairam4123's avatar sairam4123 Committed by GitHub

Modernise the variable increment in the pyprimes demo script (GH-3486)

parent 2ca3f569
......@@ -5,9 +5,9 @@ def primes(kmax):
while k < kmax:
i = 0
while i < k and n % p[i] != 0:
i = i + 1
i += 1
if i == k:
p.append(n)
k = k + 1
n = n + 1
k += 1
n += 1
return p
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment