diff options
author | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-07 08:13:49 -0500 |
---|---|---|
committer | Joshua Drake <joshua.drake@ditchwitch.com> | 2023-04-07 08:13:49 -0500 |
commit | 1161f9a034de06a63538e3a9a0b7717098c744d9 (patch) | |
tree | 55bb842b2daa4f096eb7916a8d3630426fc1c376 /Problem7.py |
Diffstat (limited to 'Problem7.py')
-rw-r--r-- | Problem7.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Problem7.py b/Problem7.py new file mode 100644 index 0000000..f1204a8 --- /dev/null +++ b/Problem7.py @@ -0,0 +1,15 @@ +def isprime(n): + divisiors = [] + for x in range(2,(n)): + if n%x == 0: + return False + return True +counter = 0 +x = 2 +while counter != 10001: + if isprime(x): + counter+=1 + print("prime number", counter, "is", x) + x+=1 +k=input("press close to exit") + |