PYTHON PROGRAM
"""
Python Program for Armstrong number
"""
n1=(int(input("Enter a number:")))
n2=n1
s=0
while n1>0:
r=n1%10
s=s+r*r*r
n1=n1//10
if n2==s:
print ("\n",n2, "is Armstrong number")
else:
print ("\n",n2, "is not Armstrong ")
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.
About Aniket Gade
Sora Blogging Tips is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of sora blogging tips is to provide the best quality blogger templates.
PYTHON PROGRAM str=input("Enter a string:") l=0 for i in str: l+=1 print("Length of Entered String is:-" ,l) *** Input ...
No comments:
Post a Comment
let me know which type examples you want to comment me.