digits made of decimal digits. Add up the digits at even positions (0, 2, 4, …) and, separately, the digits at odd positions (1, 3, 5, …).
Return True if the two sums are equal, and False otherwise.digits="3825" → False
Even positions give 3 + 2 = 5 and odd positions give 8 + 5 = 13, so the sums differ.
digits="2783" → True
Even positions: 2 + 8 = 10; odd positions: 7 + 3 = 10. The sums match.
digits="00" → True
digits contains digits onlydigits="3825"
False
Run checks the first 3 tests in your browser. Submit checks all 106 tests on the server, hidden ones included.