Computer Science, asked by Shrikrishan3971, 1 month ago

Write a program using while loop enter the number and check how many digit are their?

Answers

Answered by ғɪɴɴвαłσℜ
1

\sf{\huge{\underline{\red{Programme :-}}}}

Í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 )))

________________________________

\sf{\huge{\underline{\green{Result :-}}}}

11

Similar questions