So, after reading and studying, I attempted to answer a question. Assume a user enters an n-digit number. How do we know if it's Armstrong or not? One technique may be to record a list of all Armstrong numbers and then check from that list, but I wanted to use a different approach. This is my code...
Python:
#armstrong number
take_in=int(input("Enter the number: "))
num2=take_in
length=len(str(take_in))
rep=length
summ=0
while rep>0:
summ=summ+(num2/10**rep)**length
num2=num2%(10**rep)
rep=rep-1
if rep==0:
if summ==take_in:
print("{} is an armstrong number".format(take_in))
else:
print("{} is not an armstrong number".format(take_in))