eval (39 eased of pur viet tepuk TE ts able te Conved -to Tatgpa ac wells,
~~ Aang, value abt
io eva tat C2")
a value, fem ote tyfe to angthen type calad a5
8 Wa, Lid tone ck DO
ew ON
ave ;
> Ree
ay PERN Wha, 5
eaginonend BabitchnO ventind nl, oy
im
lied BST -mevnidsoles
= TLS A mS + Bama CMOS 4 emt Cine ener Pesbenerest*))
itn) Seal (natC oars)
L SE Rokmate/ tales Sa eval Cine: C' miter s¥evbmmarts iS)
ie isk (ag)
paseo une
Li
iad pow
=
oi
PO se cuit gedaan cot gg ee
De ad 7 “290,
ag swnlly 0 Sos clare eating > *%
| Comey ayes
seatilye tok Cingt Cnoop Ling oe:1)
eillameum)
> l-Wrte =p
4 +1
Ie su
O-o¢e =49Application
i H}#!-"u0
Dedkteo Lie
ingle usesi) (nuide uses)
eo Aptlication
Browse
BAHN Palo tS 0 grenl potprce piogsammtag Laypnge
sed to" Oesgn a chy: (hyper Tet mashup Language)
* 3% used {0 * pesfiim valtdation’ Cs)
oricate. with oatubace” baucsied ney larguny)
Vide shyes’ (acending style checks)
Tee a tod Soy fylhon. Cntagted evelopment § \eamigg, viene)
ihon sfhuwte fondation
Pespese of vas — sone the value
Pospase of method *S tp _ peat opeadkions,,> wkend ase fe (S
1D) Uterals
2) Censtarits,
9 eperatais
9) Wertfiess,
) Utewals:
“the vale which tg che
Yq_ous_progsarn.
> Ulels ase ous (4)
Dinteges 2) F
‘nage ‘
A_numloes _sithauke_decienal past
SH “agen. engl ol
enti:
“Wy cuinoesr th deciongl past”
+ hegtt=s% pak = 10S
shang
“anything which %9 encosed uth tn
eh asst .
Booleans
3 sksing —)_teleany
Tue, false ate ciled eeolean litesal
D concants
he value which ate Fred fn_owt progiamn*
a
pie atu
woof months pet yeas = ya.
3) pperatosss,
Sayfing which petfotms an _opetation’
B45 > 18 opesatod | 35 ace ofedands
eae es , ob wm
PHY 3b te cumbatue hove diefesen types of cpentcts , they ave
© AriLamelic tc LDL, be
® Relational Phe a,7eyets be
© ejeat E and ,0F, ok
® Assignment te
© shotthand Assgnmek 242, <2 ee fee, be, ©
© membershie sto) notin
ratthinetic epee |
"Ary mathematical calculation then use Arithmetic. operat
Hee WE used 0 fei maemabial lealains
+ - Adiition I ~ Floos oiwicion
& “A ~ modulo pfvision
; 4 — eaponent] powet
ee erate
a2 93 et
eathys’ teh — “catytect! 7 appending
‘ae Pho skaings alinys use 4" opiates, des uice we wil
a enol,
a. a
v v
Extos esis
Note:
——~ Stig we can add only atsings
/
> Division opetotos alusays piovide exact Valse fn the form
OF Floatiry formate,
W > loos avicion walunys piovide quotient value, “S
fe > modulo division chunys Plovide — temamdes volug
gemairdes
a
Division Flossdivisn —rodula_ div ponent
Sh > 2s ho 3 24, ans
Expiession:
“Combination of opevatos ¢ ofefond’
aos =o
Bg4r —> 340 313
cperatns priontty
wc)
ds ey
a
been
elit
> aF You brave maiethan one ofetotor usth came gritty
hen calculate Lett ro aint:
te 143 ae
SRD as
or3 =4
FTF youhave powes opetatot
Calculake pisht To Lek
side.
Ser oK
eee
one o
DEE]
ce
3 saltHY Keguasds + “veywords ane predefined wioids)
> Every veyaord of petforrn come. opetolion
> Kequotd case de seneiltive
% False, None, Tue age pesfoim values
‘whet CSE
Timgesk Vegas
Kept alist :
= oe fos. kc
False. ‘won, “Tia ,
8) Identifiers +
“dderkiPiets one uses defined wosds”
~> YeenkiRetg ate the name
methads, classes,
> AN aenbiies we
gen to voratles , uncons,
CHES modwles, Packages -
B alets No epuce.
EBL Beck Ticket — X
Bookitckek - ~~
BES Wo symeats excegk*_*, (underscore)
Se kook @ricket — x
Beok_afeket =~
RAlEBS Wo keguvsds,
go
T-v
Rule
= depode =%
gaderginde — ~~
Gan gue a name gy se need by TIES
© Sask chatactos should be eightet “alphubate of “',
1
"the same given to the mnenety .
> Vasiddles ase used to ctor val
> 4 Gan date the
5 Wy using Assigqunerk opetdos (&)
> Aselgnenent. opetatos 5 called Right to left _ofesdtes
‘ we
ta: variaglename = ake
Bag 4
te
ti
WIE? a one vavidble we can stote only one value ot 0 EME,
wheneven value comes then fist value is Oeleted.
hs US a -
ah ee wm- @
Pairk) +
eS tf me
SHRkOL A + sexrasename [rors] essen
b ic
ars o
ap
pee
Pe
>
SP "5 enol, pecausse we dorit have
OMY memory location Lith
© .
or the name “p
C= ath
615| bas & uw ~
ter ot
Su cee
bab be nas
print (@)
Print (b)
a Gime LA)
“F SwiaprIng on Two _vatiakles with aithmatic opesator
be6 es. Pb oo
: ee ne wo oa
BD Pe Pig, Gracie 3
volB-6
Pount(P) Pe Pilg, el
Paint (q)
output:
P= outputs p=3
45 output ion
* swotpirg on Tuo variables — without lasing AritheabSc_opesatos 7
a
b:8
Ob= 6,0
Pount(a)
prink (6)
*
swepring using 34 Vasicbsle 7
at
oS
x0
a-b
bec
Prink(a)
Parnk-(b)
Px mies peah
io 32 now Find Sdewerlnei le “lemgetatuon’
% Consider celsius “Terpenie 1S 32 &
Gestel
Celoiusienp = 39 =
Farrer bck Te (cetsiestne *2) an
Pink eaherhett-ienp) (¥4) +2}
* Conpiaen ehtenhet tempeiatine ts Not [degted) row Convent cele)
F = oe
ee
Pint Celsuustems) ;
‘Snholel, pizzacost ts. 3uS.60 and otdered 3 pizzas and
service chacsge Boks and tip oof- paint MM?
Pleva@ek = 345.40
uanbity = 3
cesvice chatpanitie =< ei
“Wblent = (Game ~eantty) spice charge and HP
Peunk Eetatetlrme) ith ate oP
*
Ran neprcite sogoco awmmnt in bank or 5 Yeats
‘idoest 15.3% wow find fal Arrount 7
Amount = Soqoo0
time Ss
Grisek = 3.9,
awsckime = Amaunt ye-vine *ineses | too
Paint Gntyesk ame)
Fipalamt = Amount + antseeAmE
Pink Calm)
5. Now ind
IN Abtended guy days out of 124 cays - Now +
Attendence pencenigge, 7 aiid
cee pe ae
TPlal stys ag, ee He ys
Attended = ay nia
FRicelage- attendence taal oa sald
wt Cescentage of. Attendence )* pukC): atts used TO display. . an, ute
“S Pie) tase of gfe oF dasble ques hak eves
Same higg_ ype will gt co output
Sprint Co Hat") > Hat
pint Cara") 3 243,
TF $0 wank 40 seth OPesation | then we wit ned to
NS Sth Gighe of deatje quukes
ex:
paint, eR) Ss
ass
Pom CU) sg
Pr @) yg
+ fomto:
eS, Mead tog 0 aus Pam end. uses
> WS always Reads valve-tn ok:
ing fosmat only
> me TOpUE C) Tapas,
OME Value at atime
SHS Vasigdemme = tnputc y / ‘input (* message")
Grome = frpuk ( 'entes yous nome!)
Paint C' your name is1", Ename))
evel CD? Based on uses t
40 convett
nkeges as wellas “Flocking value alse. '
SHAHN. vosintfename = eval Creat ©
NEE Convesting s €Type casting ):
“comvetting & value from one +
Ss Res ee |
[Beis cectnabnigre (Watue)_|
ms eee
We Flow, eval, sts, chor, Vise, TAC
*
SBf, az's’
= ‘Sathya!
beink@) ink (@)
int) ae
bes =" etiot
‘ ¢ ani
Read leges manbess el
C Mmessage’)
sgt; vasiabiename = tnt Cinput O/ Yanik C'rsessage’) )
Ber ae tot (Somat (* eter any Integer slumbed + yy
* Read leaking Numloet +
venkes SAS cog unbe
arto ¢ voriadename = Float Ctnpuc ("ester any aking War
EAI as Float Cinput(! Erker ary eating sumbes:'))
% Yoo Ls get a tack dig to a given muntber 7
naws
te) ng
MR
Oy
PAKED) a last chint ?
* How to geta Dey eteept fast digit (on) move
n=05 y
y= nfo
PHNEG) > Wpa
‘* oetatoys + Anything which pesfarms an opesiation,
© Aaithmetical operator:
These ate used to pertrtin mathematical Calcalations-
© Relational opetatoa;
> FF yu vant © ussite the coy
Se con usle on
> Tk ts used 0
mnadbion then Use elgtin'al
WY Condition at a time
Compate values,
st
we RO Bron vie fle)
Stes
poe a Nes 3 T
Rae Nes sy
Di ks Vis SF
“E" te assignment opettot, which
is used to aseign
Value Prem variable
Sete tel
Compute values
ral OPeiatot , which is used 40
oat = tnt Cinput (* entes your oge *))
HEC ager
else:
Paint Ciniot eligiole fot vole!) eijgje
© check given number ts poattfve of not 9
© check gen munbes ts een of odd. 7
alent]
© lrgol oprilos
ition “eet bs si
“AP you work to combine mafethan one condition fest
vot ate called Vefenl, eperatem-
@)
Gon ot a ne
FF you uiant to check enotethan one. condicion ol
. pect
Relational opetaters ue need to use legcal op
Conditions Of Thue , Then only use
GFE Any one conaitian to “Clue yothen use only,
TOES Gk Revetse ef your yesult+
Ocheck shident is pass/fail —> suvject 23s
© check umber bw ig t 25 of nok > n219 ad nz9¢]
le fos discount oS not
BilAmt >SG00 of cand = HOFC
> ‘=' 45 Called Assignment operates
> Its alse called Right 4 lePk opeontat
PR ASME ofeDaiOr aluoys Rightside 9M
left side chang, Voouable,
O® value
gant & Yactiatsle nome = velue [operand | expession
tee Right
= 4E tS used to Assi
gh value +o vatiable
oe
aa
bea
cath© shosthand Assignment. opeiateis t 42, —=
7 TE As 0 Combinalion of Assignment opetate & aaithomt
> FIs used seduce expsession length.
ex.
Cy a3 Or,
un bee be
a deb (tal '
ate Wot poesidle
423 Alla —> Wot. pes
© rembesship operates:
> 19, not fn
ase Called membeishp opeiatos.
> Tg wont check uhethen
ina sequence om
Ahoup of Values,
SO erames = [ewun', *
&
Rana’ “vidhnu' , * var
ame= Snput C* enter ‘youd name")
Serétion | nome in enomes
i False
Not Avat lable
your value 15 altlable
* Contin statements :
* contil statements
my oe s ‘apes
axe used to contsol
Conbylckaternents
|
J
Conditional statements Looping statements
if —t_1 Se
‘ Contifiue.
Range Based endition Based
es patie wean
Fovelse aratlede cat ak
mal statements *
“SE you unrk {to execute particulas set of stotemerts
Based on condition’,
«ibs
re yer wok to execube set of statements 'oased on conkon
oy
SE ypu wank to crecute only one sek, when the Graian
is tie,
sta § §E Ccondition) +
a statement- 5 Wok
skaternent -2
> AF the Gndition is tive, tP-block 19. exeuledl.+ Pelee s
TP yoo unt te execute only one
cthen use ffelse,
Sate? Wie Gerakan: &
Pete
& cea
statement —3 Y
NE? Tn case
Condition
executed athemmise “elsetolock” is executed
ay
Ne fat Cinpuk C' entes any numbes:"))
TE (nee)
Paint C* 4ve numbest)
alee:
print C* —ve number")
sigue
enket any numbers 4 10
AVE number
elk
Two cel then use of ol
ee: Kee (cnaition-i):
‘statemerk-1 3
Ceonaitions):¥ 2
stotement—2.
else > Z
eval}
statement-3
Statement}
exket any nimbet: 0
SF ypu wont to execute only ene ext cat of crea
sek > filt i “
set out oF two SelS it it check cond -1
then cor
Hecheck conde, in case
tase “1
ges cut oF
%& gue “then
Otheaice contol goes ty ‘else-bleck’
ox:
at biggest number ?
war. 40 mead 3 monbeas then part bigest number
Cngule C*erken ang, rmbe ‘'y)
bret Cog C eres any rates)
:
Cinput C* enkes amy munrbes:'))
© (a>b arc).
Paint C' aig numbes is:') a’)
elit Cbsa ona bot
ond
PRNE C Gig ruambes
else:
PANE C' Gig number ton", C
ee Tax amok,
“Pty ead compton, based on mlesy caedle
mathlysdsty
. 16 Tes
3 00900 +
> 30%), THX
sal = flout input (' enter pus saledys!))
WE (Gat < ceed):
TM sal Sflo0
el Csal 2 cro and sal
Tot= sal ¥ 15] 100
elses
Tat = Sal 2o|Io0
0
Paint C To. amount is t', Tax’)e
ae
4 walle ESF you have mote ‘than one fF
suntan: SE (conaition-t)+
Sam
TE Coondition-2):
Gu skatement-2
* Gm mutkile EGE “cheers athe Conditions.
sx bas
Git @owie
Mages 15210
Ge e-o~
Q-=3 03-4
Goose @)
output 3
1 Cg etohmer
o Wested iF 7 "A TF fnstde oF ovethes if aon
7 ere Ai Te Te ay
grt iene) THe FMR La,
A es
ECan OE Gy
\ statement) Eee 4
‘Statemenk~
Atatemert-L
MHS th case outerF fo “Twue then only e corkiol entet
Tnside of 9" then st cheeks Sones if 1 athes wise
conlve! goes out of tf.
& Goce cle.
F (mation): FF Censition)’. ‘EC consign $
iene Aaestexk-\ skaters -|
statement eee A it Ceondiion-) +
os Sechemente2
Polemen-3,
eee:
eked $6 +
I Ccoreitiona) ¢
skotemerk-2_
else;
Skakemenk-3
Tt (Conation-i)
shaternent —
MOP bo tead OR oF 0 gescory
Nustloe® -then onl
ot rot,
1 RR te 4!
If Check fetson te elisige Sox ucte
Otretuice display cessage ag “tilid age’,
ARE = AACreuECrerier yous oge:'))
(ogere):
tk Cave mumoes")
TF @ge o-16)+
PEC! elnible fon vote!)
ele gs,
aint C* nak eligible!)
elee +
Ptink Cc
‘wud age!)2 Looping statements +
AP ape unk to axeake costal cater
chen use Nooging, statements
ple times
5 val
> you komws umes of Sterabion,, than use ~Leskeee
ition
> TFyow pont know number oF Skesations based on Condit!
then use aileloap”
% Lolo *, a
8} vannblerame fn eequence [1019 (- — )}
( Sa caterer :
a
‘statement 9.
> fot loop we Can. opely fn two ways, they
Don sepuence of numbes | easoup 6 vnambesr
© on stooges =)
tle uith sequence of rnurtbes:
> Wh me Weide coe an cote erly ene value, ot « He
> F Yor unk to ctme giouP of values Sin Sige vasabe
we need {0 use collection concede
SB bo: Lana)
% WOR To dead Sy
% Range (,—,—)!
ket laced on
genetate sequence of numiets base
Tk uM Love 3 inputs
Tonge (Stas, stop, step):
Defoult value of start is
Default value of step is
a i) :
© vonge (16,0 +
© ome CL), 4 522
® we Us): + 1234
D some) 5 02.3.4
HWP. Fo Find sum of *0
somneo
get in songe,
som= som
rte Gos)
Pink: Cthan you") > Mtg
outfoky 3 234B-%
Thane you. a> tq =u
ee . then Porn =i ty oy" numbeas
az ink(input ( ‘entey any nurnoesn:'))
eee tin sane (ure
( Print(i, end="\
Pant Cthank You’)
outputs enter any mutton +10,
1234S 64HQ10
Thank You.
valueLeaping proytoms
Factovial oF given murder:
8 onsen a: (Sq 1.44)
. © Display only odd rummbes 7
“product of “1 49 “nt nurtoets” 9 4
SURES
* lime Nuabes ¢ © Fd com of all numbers 7 :
Paine (° som of alt numbesss’ )
a: anual
* mumloes ushich has only two avistcles ( @ iself)s
S364 iL wy,
sum <0
fol i in ay
© peafect number : Sum = gom +i
“som of tts divisibles “except ‘tked, chad equal t0 Paint (Gur)
OHginal nurrkes *
® count novo odd numbers 7
Pink C'o. of odd numbers: ')
Coont=0
O- Gat]
& rQ wl
Divisibles | 1-2 3
sum is: @
> Awe numbes and sum dwvishles ate Same.
Se tk is perfect mumbes,
Count = Courk +1
Paint Count?)
® osplay at ny
a4
* eren number:
2
“ang number which ig dwisible by 2
SE M6, 9,101, -- >urnkes $9
© Hind sum of even and odd
B oi
yY
a: [5.9,124,7)
ever\=0
Odd =0
for i May
iF Cnr ==0):
even seven ti
elses
Odd- odds’
Csum of even rams: everi)
C'som of odd numbers:', odd)
Play Biggest wumbem in yous lisk >
& [E9149]
PHME C Biggest: number ig 4)
was ig = abo}
fos 7
Pring
Pat
Pain iq)
®D Display cmaitesk nwmbes in yout lick 9
a= [5910,4,7)
PREC Binallesk number %
small = ate}
fo ima:
F (Smal
small
)
Print (small)
B® wap. to tend a numbed then find com of “i to “y
nambbeis. 9 :
N= fot CinpuC'enkes ary numbes:'))
sum <0
fos F fn sorge C1 net)
sum 421
Prink Gums, ") som) ae
4078
Duop to vend a mbes then Fina product of “V 40
$F vumbets 7 .
ie = ink input Clenes ang numbes ))
product =|
fort tn songe C1nait)t
Ploduck wot
PRNEC' pioduck to;', ptoduct )
® wap. to sad “n' vahe then print *
netekCInput(' ented any numbes:'))
for 1 fo sarge Cn,0,-1):
Print C1, end ="\e)
@ wap. 0 send a numbed then prime “i to “Weve
Mumbets by using IF condition in loop 9
ns at Cinput eked ang rumess:°))
Pine Ceven auimbens Up to
fob 8 in Bonge Cu nse
if (yao)
Paint (i, ena =e) i :
@ VaP to sead'n value then pint “I ton” al divisible
"by using iF Gndiin ty loop.7
& CinpukC ‘enter ony numbers!) )
Pint C dwisiile of yumbeng ane
fon 1 to samge (1, nit) t
Cra ae
paint (1,ena="\t))
to 7" numben 9
gen nummbse@B wap to Head a ramkes “thery grit “f ton
O88 & even numba 7
neta CingutC 'entes any nutes !'))
Paint Codd" ena= Net)
Paint C° even")
fos fin
elses —
Paint)
then
we Wag to tead stoik numbed amd end aumbey
Paine eoquence 9
steak = inkCinput C enkes stasking aumbes:"))
ord = HEGIMPUE CS ene end numbers!)
F Got send):
For 1 tn sarge Gtast 1,
Paint Ci, end =k)
else:
BEE Ne ORE (Lend Dt
g PBOE (4, end Ht")
MOP > sad arumbet then pint eultipicabion Table 7
nz‘nk Gout’ ented ony rumbes:'))
os TA sage Cay):
Pink Cmte § set, met)
© anstes a- (E
are divigile by “4
a Bawsa)
fas
F Gus 220):
Pink (1) ema
@ cnsiset q Earns) vow fing diffesence bly igest
Tumbea ard smallest number 9
4) vow pink al numbems which
smal
ve Pink Coitresence ist, wig ~