code to check if a number is prime python using function code example
Example: how to check if a number is prime in python
def prime(num):
for x in range(2,num):
if num % x == 0:
return False
return True
def prime(num):
for x in range(2,num):
if num % x == 0:
return False
return True