#add this code to your code and call "nextprime(number)"
def nextprime(n):
prime=0
n+=1
for i in range(2,int(n**0.5)+2):
if n%i==0:
prime=0
break
else:
prime=1
if prime==1:
print(n)
return
else:
nextprime(n)
return
def prime_checker(number):
is_prime = True
for i in range(2, number):
if number % i == 0:
is_prime = False
if is_prime:
print("It's a prime number.")
else:
print("It's not a prime number.")
n = int(input("Check this number: "))
prime_checker(number=n)