projects
/
cython.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
More graceful fail for fatal-errors option.
[cython.git]
/
Demos
/
pyprimes.py
1
def primes(kmax):
2
p = []
3
k = 0
4
n = 2
5
while k < kmax:
6
i = 0
7
while i < k and n % p[i] != 0:
8
i = i + 1
9
if i == k:
10
p.append(n)
11
k = k + 1
12
n = n + 1
13
return p