Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Prime numbers
# print primary numbers max_val = eval(input('Display primary numbers until? ')) print() for n in range(2, max_val + 1): if n == 2 or n == 3: print(n, end=" ") if n%2 == 0 or n%3 == 0: continue i = 5 while i * i <= n: if n%i == 0 or n%(i+2) == 0: break print(n, end = " ") i += 6 print()
run
|
edit
|
history
|
help
0
gj
python codewars
Search for sum of pairs in given array
gj
replace
Python My G(ame,uess)
pattern
(P3) Fibonacci 2
H.W5
PyDIP