Write a program to obtain a number $(N)$ from the user and display whether the number is a one digit number, 2 digit number, 3 digit number or more than 3 digit number

-----Input:-----
- First line will contain the number $N$,

-----Output:-----
Print "1" if N is a 1 digit number.
Print "2" if N is a 2 digit number.
Print "3" if N is a 3 digit number.
Print "More than 3 digits" if N has more than 3 digits.

-----Constraints-----
- $0 \leq N \leq 1000000$

-----Sample Input:-----
9

-----Sample Output:-----
1

Difficulty: interview

Starter code:

Solutions:
# cook your dish here
x=input ()
y=len (x)
if y==1:
 print('1')
elif y==2:
 print('2')
elif y==3:
 print('3')
elif y>3:
 print('More than 3 digits')

# cook your dish here
n = input()
l = len(n)

if l==1:
 print(1)
elif l==2:
 print(2)
elif l==3:
 print(3)
else:
 print("More than 3 digits")

# cook your dish here
t = int(input())
a = 0
while(t!=0):
 t = int(t/10)
 a += 1
if(a==1):
 print("1")
elif(a==2):
 print("2")
elif(a==3):
 print("3")
else:
 print("More than 3 digits")

# cook your dish here
n=input()
if(len(n)<4):
 print(str(len(n)))
else:
 print("More than 3 digits")

n=int(input())
if n<=9:
 print(1)
elif n<=99:
 print(2)
elif n<=999:
 print(3)
else:
 print('More than 3 digits')

N=int(input())
c=0
while(N>0):
 c=c+1 
 N=N//10
if(c<=3):
 print(c)
elif(c>3):
 print('More than 3 digits')

digit = int(input())
print("More than 3 digits" if len(str(digit)) > 3 else len(str(digit)) ) 

digit = int(input())
# if(len(str(digit))>3):
#     print("More than 3 digits")
# else:
#     print(len(str(digit)))
 
print("More than 3 digits" if len(str(digit)) > 3 else len(str(digit)) ) 

N=int(input())
count=0
while N!=0:
 count +=1
 N //=10
if count<=3:
 print(count)
else:
 print("More than 3 digits")

# cook your dish here
n=int(input())
c=0
while n>0:
 r=n%10
 c=c+1 
 n=n//10
if c==1:
 print(1)
elif c==2:
 print(2)
elif c==3:
 print(3)
else:
 print("More than 3 digits")

n=int(input())
if n<=9:
 print("1")
elif n<=99:
 print("2")
elif n<=999:
 print("3")
else:
 print("More than 3 digits")


N = int(input())
if N < 10:
 print(1)
elif N < 100:
 print(2)
elif N < 1000:
 print(3)
else:
 print("More than 3 digits")



n=int(input())
sn=str(n)
if len(sn)==1:
 print(1)
elif len(sn)==2:
 print(2)
elif len(sn)==3:
 print(3)
elif len(sn)>3:
 print("More than 3 digits")

num = input()

if(len(num) <= 3):
 print(len(num))
else:
 print("More than 3 digits")

# cook your dish here
n=input()
if(len(n)<=3):
 print(len(n))
else:
 print('More than 3 digits')

# cook your dish here
try:
 n = int(input())
 i = 0
 while(n>=10**i):
  i = i+1
 if(i<=3):
  print(i)
 else:
  print("More than 3 digits")
except:
 pass

n=len(input())

if n<4:
 print(n)
else:
 print("More than 3 digits")

# cook your dish here
n = input()

lent = len(n)
if lent <= 3:
 print(lent)
else:
 print('More than 3 digits')

# cook your dish here
n=int(input())
s=str(n)
a=len(s)
if a==1:
 print("1")
elif a==2:
 print("2")
elif a==3:
 print("3")
else:
 print("More than 3 digits")

n= int(input())
c=0
while(n>0):
 c+=1 
 n//=10
if c==1:
 print(1)
elif c==2:
 print(2)
elif c==3:
 print(3)
elif c>3:
 print('More than 3 digits')

# cook your dish here
def __starting_point():
 s = int(input())
 if s<=9:
  print(1)
 elif s<=99:
  print(2)
 elif s<=999:
  print(3)
 else:   print('More than 3 digits')

__starting_point()

# cook your dish here
s=input()
if len(s)==1:
 print(1)
if len(s)==2:
 print(2)
if len(s)==3:
 print(3)
elif len(s)>3:
 print( "More than 3 digits")

n=int(input())
s=str(n)
l=list(s)
x=0
if len(l)>3:
 print("More than 3 digits")
else:
 for i in l:
  x+=1
 print(x)