```
#this function checks if a number is a prime number,
#if not it outputs the lowest factor.
def isprime(n):
"""Determines whether a number is a Prime number,
Takes a single arguement n, which is the number"""
if n==1:
return 'Not a Prime number, only has one distinct factor'
elif n==2:
return 'Prime number'
elif n==3:
return 'Prime number'
else:
for i in range(2,n):
if n%i==0:
return 'Not a prime number',i,'is a factor'
else:
return 'Prime number'
#example
#print(isprime(590))
#outputs
#>>>
#('Not a prime number', 2, 'is a factor')
#Adegoke Obasa ----adegokeobasa@yahoo.com----
```