Write a program using while loop enter the number and check how many digit are their?
Answers
Answered by
1
Ínput Cõde :-
import math
def countDigit(n):
count = 0
while n != 0:
return 1 + countDigit(n // 10) ___(1)
OR
return math.floor(math.log10(n)+1) ___(2)
(Note use the most applicable black marked portion because first is not accessing properly)
return count
# Driver Codē
n = 98532445888
print("Number of digits involved : % d" % ( countDigit ( n )))
________________________________
11
Similar questions