Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Prime Numbers : -> Conventional Method
#python 3.5.2 import math from time import time start = time() N = 99999 prime_array = [] for i in range(2,N): is_prime = True for j in prime_array: if (j > math.sqrt(i)): break elif(i%j == 0): is_prime = False break if(is_prime): prime_array.append(i) end = time() print("Total Time : ", end-start) #print(prime_array)
run
|
edit
|
history
|
help
0
Program of cube
ort
Magic Calendar of any month
Creating Person class
PyQueue
Reading XML file to modify
PyGen
N. Py
Rectangle Perimiter
Square-Triangle Numbers