Function for checking number is prime or not
def prime ( num ) : NEW_LINE INDENT flag = 0 NEW_LINE for i in range ( 2 , num // 2 + 1 ) : NEW_LINE INDENT if num % i == 0 : NEW_LINE INDENT flag = 1 NEW_LINE break NEW_LINE DEDENT DEDENT DEDENT