def armstrong_num(y):
sum=0
chk=y
while chk>0:
digit=chk%10
sum+=digit**3
chk//=10
if y==sum:
print(y,"is an Armstrong number")
else:
print(y,"is NOT an Armstrong number")
armstrong_num(153)
153 is an Armstrong number
def armstrong_num(y):
sum=0
chk=y
while chk>0:
digit=chk%10
sum+=digit**3
chk//=10
if y==sum:
print(y,"is an Armstrong number")
else:
print(y,"is NOT an Armstrong number")
armstrong_num(163)
163 is NOT an Armstrong number