Q.No.1 - Write a program to check Armstrong number in a given range enter by user.

Sol.-

num=int(input("Enter your range"))
for i in range(0,num):
    power=len(str(i))
    temp=i
    s=0
    while(temp>0):
        d=temp%10
        s=s+d**power
        temp=temp//10
    if(i==s):
        print("This number is armstrong",s)


We just need to input from user the range. To know more or understand in simple way without range "Click" - for simple armstrong number program.

OUTPUT: