Write num_digits(n) returning how many digits a positive integer has, using a while loop and division (0 has 1 digit).
num_digits(12345) → 5
num_digits(0) → 1
Submit runs 4 tests, including hidden edge cases.
Run your code to see the output here.