def power(num):
global n
n=0
temp = num
while num >0:
digit = temp //10
n = n +1
temp = temp // 10
def armstrong(num):
sum =0
temp = num
while temp>0:
digit = temp // 10
sum = sum + (digit**power(num))
temp = temp // 10
if sum == num:
print (“The number is armstrong number”)
else:
print(“The number is not armstrong number”)
num = int(input(“Enter the number”))
armstrong(num)