num=input("enter a number:")
y=len(num)
sum=0
z=int(num)
while z>0:
digit=z%10
sum=sum+pow(digit,y)
z=z//10
if(sum==int(num)):
print("it is armstrong number")
else:
print("not an armstrong number")
enter a number:121 not an armstrong number
num=int(input("enter a number"))
res1=5*num*num+4
res2=5*num*num-4
p=res1
q=res2
x=int(pow(p,1/2))
y=int(pow(q,1/2))
if(res1==x*x or res2==y*y):
print("it is fibonacci number")
else:
print("it is not a fibonacci number")
enter a number5 it is fibonacci number