Write a Program to count the number of digits In a Number@

#1
num = 12345
count = 0
while num !=0:
num //=10
count += 1

print("Number of digits: " + str(count))

#2
num1 = 123456
print(len(str(num1)))

1 Like

@shivakumar271195

correct, keep it up.

@shivakumar271195 very good. Keep it up