def primecheck(num):
if num > 1: for i in range(2, num): if (num % i) == 0: return False breakelse: return True
Im trying to make a function that checks if an input is prime or not. This code does return True if I enter a prime number, but it also enters true whenever I enter a multiple of a prime number? Why is this happening
thanks