Write digits(n) returning how many digits a whole number n ≥ 0 has, using a while loop (no str or len). 0 has 1 digit.
digits(2025) → 4
digits(0) → 1
Submit runs 5 tests, including hidden edge cases.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.