Write a Python program that takes a number and prints how many digits are in that number.
[Consider the input number to be an INTEGER.]
[You are not allowed to use len() function]
Example: If the user gives 9876, your program should print 4.
n = input('Enter number here:' )
j = 0
for i in n:
j = j + 1
print(j)
Enter number here:9876
4
Comments
Leave a comment