repl.it
@potatosmurfer/

Prime finder

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import time

def main():
  n = 3
  x = 2
  while True:
    time.sleep(0.001)
    if n % x != 0:
      if x + 1 != n:
        x = x + 1
      elif x + 1 == n:
        print(n)
        n = n + 2
        x = 2
    elif n % x == 0:
      n = n + 2
      x = 2
r = input("")
if r == "finder":
  main()
elif r ==  "checker":
  y = input("what number do ya want to check my nigga")

?