Write digital_root(n): keep summing the digits of n until a single digit remains.
digital_root(n)
digital_root(942) → 6
digital_root(0) → 0
Submit runs 5 tests, including hidden edge cases.
Run your code to see the output here.