Python Notes (1)
Python Notes (1)
n
a- Int(inputl*Enten he nem ben
b: int (inputl Enten the nun be )
CkanPte
Paint( io,2e, 30 . seP-(#), end- " ")
a Paot
Q0
Ekevkiom based an
fetSe
ef
he sptemen
Symtox Cantaal
if Cond
T38
the
chalacteaa:(in("given
"
(yes) Raint
a==,
z'U' a o, a', a
1F
',a='U, a=:i',a a=='e', a='a,
)ing: t("gve
he (aPut 6=
grvemchanacten gven tthhee then whe check WaPt
.nat ise is8
walue
mot chanace
a
>5 a
(Taue) PAin
5
and.
4>
-5 int a
an give
the (inpub("
ar-lo
0. 5
en umlce)
is gien thehhethen check toWaP
sten) (nci Pan
bongaje toaion
is Job he.
ny nny (on afen gsten Pnosam
to WAte.
a
eveny nd muliPe of 5
if a2-0 ond
pAini ("ave"
a (inpt(Enten
the chaoclen "))
if a in 'ABCDEfe H1JkLMNOPO RSTUV WAy2:
Pamt(aue ')
I/ as(inut ("Enten the canache
if AK a <: 2':
/'Aaand a: 2
(inPUt(^Enten he APhabel )
Paint (aupbaet
hap o check whethen the ien nembe| is baving 9 digt
0n not.
ain!(inpot("EnteA the nwmbe))
Slalemn .
n hi5 aSe if the anditioo e 4Qve then the
4NeStoatoment blork
Conko
ets
aintaseSkalement
TAvestatemenf
checK the glven dafa s
Dwnite oa Proglam te
mufable on immta bie.
-> az (nputl^2nien the data y
labe!
oNe
two vaniable ane Roinng to the
ese:
Pain (^ heaotnos) io q
nmben is multipre of
hap to Cheek hethen tthe gven int
no. int (inpot(°ententhe vave
if a yefo]) = Compex;
paint (" conPrex
ei[e:
elif codi
else'
T
SB
check onditHon1 if ondion o
this afe onte Nn ome amd Sfatement blocu, And
|n execUfe te tnve
then it Win
e t0Ue Hhe e fStatmen
wi Ome cuf of
go and cheek fon the
se hen it w
the condifion i fat
Tf
Becond (andition. fnoy
the comtin
ka wi check al falge sla tement
nay con
1n the Seme
deeenas biock}eise block )
Biock.(oa Defot!
o checu Whethen the given chaaet en is
Aacte a PArain on &t aseii vaue fholacte
CPPen coSe of bwen ase
asoir Pat Polo 6scii ant
Pgini bWen ase if chaacten is
(infutl th give the vaive)
Pant"CPPen ase )
elik a='A' and a= '2
Pain ( Lowen ase")
etif a cd(a)>oand and (a)<: t24 :
WOp to check
daintype
it tyee(a) int:
PAin (" int sn dalayre")
tyee(o)
Pnin (u nead datet ye)
NGe Foint)
(Slene' on 'exlo Givenin the
Wheneen weu See
Wethe em PEy colte ton.
a: input'Entea)
if a in aeioU AEToU':
Pan)
AEToU'
etit a not in 'aeiou
Paint lond (a)
int(inputEnte the nUmben a: ")
b: ink(inpU-("Emten the. numben bi)
( >int(int Enten the. mUm
bene:)
Paint ("o is 2hetea ")
Paintc"bi8 gaaten)
Pninc is garaten)
adeale")
calacte
whethen the given
) taia WaPT Finttt check
uPencase on nof f UPPes
ConSe.
>alinAutEnten hevalve
(a) <-30:
t*{A f anL(a)=6b and ond
(owen .case.
How to Conveat uPpen cage
(onven (Owen cuse
nesvlt 9nd (tn)-32
chalacten of
the SasE
wnte a progam fo check whethe
chalacteA on not
speeial
the given Stning is
ae (ineut( " Enten he alue ")
VNested if Statement
nothen if Shotemen is Calig
An if8Batemen! inSide
> the
a[ neSBed if Statemet
man then one ondion an if the
When We have each othen hen we ye
Cndition ale dIPend n
nested If.
Synto if cond2:
iE cond3:
eIse:
) ese
el#e:
FSB
|FS8
Flow di
etf con"
dite
eSe!
etSe
ege
F3B
Page.
nite ap to cneate instagamn Logn |UN= ABcfes
UN:AB123' Pu)- d234a
Pid= y2.340'
a= (input("Enten USen nome
b:(inPut(Enen oss twand)
PNd
HOme Page")
esei
Rong inPu! )
UN =:a:
if Pvd= = b!
e18e: of belagu
Pnin! ("wamg Passhond)
2is) valves Ony
of
Va|Ue af He
Paint midd le havig engh 8eotn
middie. valve is sbing and
if
tt the
if len(a), 2 =:4:
iF nK=aen(a)r2<: 'z
Paint (aen (a) r)
int (info enl en the aue)
Ab And ace:
if b<c!
elße:
SmaleSt"/
Paini ("e is 8econd
lf b<a 0nd b<c
Faise
URlalion
Paint Pyton do tyme8
while i<lo
Paint (yhon) i4:ltl=2
i:2< o
Python
Python
Python
Pythog
ython
Pythan
Pythan
Python
NaPto )t n ndlas noba
while i<-n
Paint fn) (i, end:)
even
to Point au the.
aive of a)) 2
>a i n t t{Enten tne
L
paint (1)
3<-50
ese:
Pnint'e havteched{i,)
formated Smg. 4<=50
422=2o
Print():4
melk'Piahon table,
waP!o nnt nth
n:intnPuLEntelt the value of N)
1to d6o.
Calculate SUm of
PAint(a)
find tut
to^Sm n nottna numbel.
(ontutnte
intnPUF (E nten the, nombe
1
white i<:n:
prni(s) nde in
at even
aP to Xact an the Valwes Paesen
while
Paink 3)
4igit ofa non0
twa
n 54 4
5+441
3o
3
inpd('ata)
(o01)
fonLooP
whielooP vg telation Ehat fime We o
Ne dont no the nmbel of
-> when Nhile looP.
of ibeAation at time
okino the nmbrn
’ when we FaNLcoP.
We Ao fon
Rongefonetie ence
o se
> 9is a foncion whichiUSed to genena
nUmben betwee the speiied nembe)
0angelen/)ae
|oniain Cyindorpsilin
| Value
have
(oitechian but # dusrot
oen 3Aurkune to dispiay the ouAPub. o ove (ome
Ne maVe
yoe mdbing.
G'venshn
wapto Pnimt cach and eVENY chaNactenResent
sAing'
fon i im a:
Pnin
GYPLKCBPLG I
3az'SLAng
ev"
fon
Paint (aev
fon i in ey nnge ):
vatve the Enten nPut(
Iength.
matpig by
Liationang
it, tist inwagdB
emctey having is {E
alt 3
fnam even i8 iEamd the exlact
a towap
(S) Paint
() nt3+S=
find haPto
PAeSent dig the a ofum sthe
toen given
in ain
-
coen kap
a f to
chalarlen. sedhicd
fan
-
bse SBn(a)
i in :
ed togpi he &iven
ion which i3
hito nmben of Sub Stning ana wy be Stole
Symkox
van. 8 Pit (chon