In Python3.7, entering this function and passing the number 5 to the function results in multiple return values of "True". What's causing that?
def is_prime(num):
'''
Naive method of checking for primes.
'''
for n in range(2,num):
if num % n == 0:
print 'not prime'
break
else: # If never mod zero, then prime
print 'prime'
>>> is_prime(5)
prime
prime
prime