If a [ i ] is a perfect square
if ( math . floor ( x ) == math . ceil ( x ) ) : NEW_LINE INDENT sum = sum + a [ i ] NEW_LINE DEDENT if ( sum % y == 0 ) : NEW_LINE return True NEW_LINE else : NEW_LINE return False NEW_LINE