Created
November 11, 2020 18:32
-
-
Save staccDOTsol/3aa8c02de4e192514a25a28df5b0f90d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def isprime(num): | |
if num > 1: | |
for i in range(2,num): | |
if (num % i) == 0: | |
#print(num,"is not a prime number") | |
#print(i,"times",num//i,"is",num) | |
return(isprime(num+1)) | |
else: | |
print(str(num) + " is a prime number") | |
return(num) | |
else: | |
print(num,"is <= 1, not a prime number") | |
return(isprime(num+1)) | |
greatestprime = -1 | |
while True: | |
greatestprime = isprime(greatestprime + 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment