Function to check if all array elements area X
def check ( A , X ) : NEW_LINE INDENT for i in range ( len ( A ) ) : NEW_LINE INDENT if ( A [ i ] > X ) : NEW_LINE return False NEW_LINE DEDENT return True NEW_LINE DEDENT