Date
Pege No 23
Title:
that qiven nuiber is.
Amsrong nmber Bo python.
*abjeches
Under stangl besicCacepls o poog anm
-Nig tangtge longuage ao ty to solve.
mbhenÑautca) Calecladion inproqramning
cpproch coith he helo ef ormwás
eqixahiog
*Pblem Stodemtat:
1o Cbeck whether: iogt nuber is
Acmstonq
ang numher0s not An Armstong
eamber is anintener cwith hre&
igibsSuch tat Bhe Sumb op the
di¡ib is
Ccbe o f t diqibs equal to
he numbey Jösel£.
Completioo ofo 8:s asinmend gtaclends.
ewil) ableto
Unclesslen fhe ockinq thoo
lopp
Duclens will be adle to tnoessaal besic
*soene & Hecunce oeqireonents
bgie
Hascloae eguremerts
1GR RAM moreR_asdDisk mo6e
Sortease_seg tisements&
L&2lcA bit liouxWbantu/Fecloa) dperaiog Systen
atest ay plhon toals JugyterNoteback Anatoncla
Pcharm, Ryfhon tDE, Cnc Rrthon atom, Echose.
Mnfnotas
My Knowiedge bant
Date:
Page No 2,
Toeo (opcept
Te t)nderstand is eca ple yo ghecub hove
the konalecl efallaine pythen
pog seLming coaceptwith besic topics :
python if Else otategent
2.'pthon cehile laop
What ae else statement 19 pyth on
Deeisioa makin ic feg uiced coheo
wp ant to eaeeute' c Cocle ony i a e
Concition is satis fiec!.Thif..
elifoese Stodemod 's used in Rthon
for decisien makng
Rythop if-staternerd Synter:
1test
expess)on.
Hese, the psoblem evaluateg the test
Expressio and' coil1 erte cute Statemeot G
ooly he tne iect PacpreSsiosn is
is inchcated by the indentation. Bacy
Sasts caith ni
Eicst unindelel kne nark the end.
pythnTde hxels Don-Zero Valuer
Talse
Mmynotes
My Knowledge bank
Date
Prge No 25)
Prtho A
stetemert fbeochet
Test
tepresaale
True
Boryc
Stetemet Sust,belbceo
ocaenplei ythor stademerti
#ifthe
prìnt an
Dumber ic passiive ce
apmoprinde messatae
priat CDum, "isa pasikire Dumber ")
printCÍhis is alaoss ")
alaayg printel)
poitve
Dumbe
psind This is clse cleys printel:)
goint
A posiliNe ineges is Calec ar
Armstöonq numbes a asoler n if abcol
anbnten + elnt
Tn Case of cyAtmsteoag number ol 3aligis's
mynotes
noledge bank
Date
Page No. 2
or Leamp le : 5ss* 4 3* 3" 3
153= I*|
is armstsorg oumbes
Alosthn i
Step L: SBast
Step2: Accept c oumber forth the useo
Step 2:ioitiaize Sm to O.
Step :findo
+ the Ceebe of each digit
o the entere ouher.
S: acb
Step Si ol te dit
e cube of c!
Step 6: IE eccepted andum
number
e equ, it Asmtong
Number.
BBep 7: En.
Llochabi Sast
acrept ea
iaitiaize Suneo
NO
Suo0U
Tyes
Mnyno'as
Pa tuy 27
Peoga Coclesoth oednd
H ´poth ofn proqsem to check i#the numbes is
Qsmstoong number o6
06 nob
-Takeinpud Gomthe Use
input("Endes Number to check foo n.
amotrong")
Sum:o
cokle Ci>o):
oriq_ =sSumi
piin C"Armstsong numbes")
else:
Print " Not Amstnong numbex "")
Ouputi
Entes a Dumbes i343.
B43 net Asmstsong number
Estes a oumber : h03
A07 Aimstanq uaber
Conclusio n
Thus cwe hare stucioc pertocmed
numbes
CIrmston Canceptio Python
progsan nig
[4]: i=int (input("Enter Number to check for armst rong") )
Sum=0
orig=i
while (i>0):
sum=sum+(i%10) *(i%10) * (i%10);
i=i//10
if orig==sum:
print("Armstrong number")
else:
print(" Not Armst rong number")
Enter Number to check for armst rong 153
Armstrong number