Function to check whether a number is a prime number or not
def isPrime ( number ) : NEW_LINE INDENT num = int ( number ) NEW_LINE i = 2 NEW_LINE while i * i <= num : NEW_LINE INDENT if ( ( num % i ) == 0 ) : NEW_LINE INDENT return False NEW_LINE DEDENT i += 1 NEW_LINE DEDENT if num > 1 : NEW_LINE return True NEW_LINE else : NEW_LINE return False NEW_LINE DEDENT