I've made a function that checks prime number, it's running fine but i don't know why it's showing None after the result.
Here is the code -
num = int(input('Enter a number:'))
def prime_no_check(num):
if num>1:
for i in range(2,num):
if num%i ==0:
print(num, 'is not a prime number')
break
else:
print(num, 'is a prime number')
else:
print(num, 'is not a prime number')
print(prime_no_check(num))
Output:
Enter a number:7
7 is a prime number
None
Please help me find where the issue is in the code.