Hey If you are beginner and want to learn a python then you are on right path. Learn basic as well as advanced programming in Python.

Search

Python program to find all the Armstrong number between the range of 1 and 1000.

PYHTON PROGRAM




print ("Armstrong numbers between 1 and 1000")

for i in range(1,1001):

s=0

a=i

while(a>0):

r=a%10

s=s+r*r*r

a=a//10

if (i==s):

print("\t",i)




*** Input && Output ***





No comments:

Post a Comment

let me know which type examples you want to comment me.