Jul-27-2018, 03:31 AM
Translated....
Can I recommend that you actually provide the actual error message and not just state that something doesn't work? And letting use know what you want to accomplish it helpful, too.
def primes(kmax): result = [] p = [] if kmax > 1000: kmax = 1000 k = 0 n = 2 while k < kmax: i = 0 while i < k and n % p[i] != 0: i = i + 1 if i == k: p.append(n) k = k + 1 result.append(n) n = n + 1 return result print(primes(1000))Pyrex was a tool that combine C and Python syntax in a single file and could be compiled into an extension module. It became Cython and is used extensively in the scientific environment.
Can I recommend that you actually provide the actual error message and not just state that something doesn't work? And letting use know what you want to accomplish it helpful, too.