Skip to content
Code ReadingHow Many Digits?
Break the Code

How Many Digits?

Write a number for which this function gives the wrong answer.
1def digits(n):
2 count = 0
3 while n > 0:
4 count += 1
5 n = n // 10
6 return count