Skip to content

Instantly share code, notes, and snippets.

View makthrow's full-sized avatar

Alan Jaw makthrow

View GitHub Profile
def find_next_prime(n):
# A prime number is a natural number greater than 1
# that has no positive divisors other than 1 and itself.
# find the next prime number greater than n by iterating +1 and checking
# if the number is prime
o = n+1
while check_prime(o) is False: