67% found this document useful (3 votes)
7K views6 pages

CH 5 Flow of Control Class 11

The document discusses different types of statements and control structures in programming languages. It describes sequence, selection, repetition, and nested structures. Common statements like if-else and for loops are explained with examples.

Uploaded by

Pappu Pass
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
67% found this document useful (3 votes)
7K views6 pages

CH 5 Flow of Control Class 11

The document discusses different types of statements and control structures in programming languages. It describes sequence, selection, repetition, and nested structures. Common statements like if-else and for loops are explained with examples.

Uploaded by

Pappu Pass
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

L-5 fLow OF CONTRDL

Expt. No- Page No_

Statementa : -9natauctios gum toComp to belom


any ind actis data moueme,|
-makig deccton
sebeatinga c i o
yea Statemeat
Embi Simble Conmbound

EMPT :Statement which does notig


> þass
null op Statement
- 9t doea
doeA nething- moves To negtstatement
Ae P a s ahese 2ptas D auage
eguisespaesence tatement but
rhese ogie puo :oloe not E: leehi.

SIMPLE: Eeutable atatemet ia2impl etatemeit


name Linfgt 'Ente ")
hMnt (name)

ComPDUND qp atatemevit eyected as uit


Umt

Syn Kompounel adatemet heade:


<bodly
neaole :
begina th keywoxal _emols usit

bodu 1 mo Adalement
- a l l Atatennewt
ane honung Romme
indentadtiow
Statemen floo Coninel:
AOguence eleeion itenauon
Date- Teacher's Signature
SESUENCEmeamatatemeii1eyected peguenti all
notmal lod covtnsl i n þrog i imlet
ne
St 4
wweRKI NG:
st.2 Pytho brog bev w t iut st Eacl b
exected w uem final stalement
t3 epecuted ueg
pcio Rene.

SELECT1ON mea executi st lebendig upon


F st1 Cond test
- Aso called oleeino constuet it hetfa in

rmaki deciai aboul nwnieh Ret instuc


ion to be executed.
Co st wDRAIN 4
baeq
5g cond ewcluae to tue
sti a net ntatemet io slloueo italae
t ala
anethe net at b follooe
REPETI T1ON1TERATION LOOPING
means epeati tion net at dlepeneling-
CfOR/OHILEJ upon conel tet
- set q St that ae eseate- agin and again
iocalleel bod O oos.
w
whhiie
l
Cond" ow
depenolo
erecuesn [eket qLoop
alled
test-cond" /enit enol
Conol wORKING
T pag tiu the time cAnel"
9n
sti Leop TAue, a2et s t a e sepeated
St2 As sevr a Cond beeomes falae
i a,iapeatitin
peatitin

stops
Tuo Tyfpe Comel " a Loep ehile Ccond" baaeo oop)
Counting Joe CLee fo giue no
times)
1 E STHTEMENT teattet a (enal i LOnd evaluates
Expt.e.COnol") Tue, it Laues suit ASmke instuuetum
dioe ncthen Lane tonot Evatrale
Spni tofadae

<cond" exp>:
St 1e i Tue st 0 bod
St
eycudedethunie
Ex:ch inut (Eter a chanades")
c ==
bAsint Yow emtered ahace)
EELsE STATEMENT-94 wauatu Taue, blocle eelow i
2 comd ")_ ge execded
COm ae heck
evaluatea falae, bleck heloo
elar gelexecuted
conol exp::
else
St1
Ex94
hAsint(a)
elau
Mnt a , _ a negauiue nunmbe)

IE-ELIF-STATEMENT4 iida amether -ela


many imes bonible can adol el
cond exp>: ond"Kcond enp>
st
elit Cond exp>i elih <ond" exb>
st
elae
Date Teacher's Signature
Ey: m >a Joo
pAint C Coctu)
selih (wne- sto)
pAint fsty ")
elae:
hasint ( Scow less

NESTED F STATEmENT- imicle anothe


(Multahle cond") inaide anothe
Anaide trothes elae baol
Sm
9 cond">: coral"s
tLond">:
St elib4cond"> at
elae
elae At
<conoln
else
t elsu:
elae: elae
At
4 i ond"> : ST0RINg_COND
Seonl ">: We can me te Landh as
Rt nomeumes Condn
elae: taeolln coole
aue complep ano
Aepetceiue
eku Kcond >: Ex: i deboait < 2ec0 fime>=2:
h < condh>.

ela Named Condn -a-dapont <2ovo d


tu'me s 2

eloe
c o d h >:

eloe
Range f wwed uith fov Leep.st
Expt. No- genehat Rist whic io 2pecial Rueme tfe

Sgquenu Ruccasin 6 aluea bound Togethen y a

Rgle name. EXStaing, iattutle


pi hamge
(<louelumt> Sushes linet> step value
aGnge l , u,s)
Aana 1D):A0,1, 2 3, 4,S
. F8, )
Aange L, 5 (L2, 3,4.3
AangeL S, 2) (1, 3)
FoR LooP bAocek Ahe item an
ALQULeMe Aike
Ligt pnRiuin neby On.
Spa <uaniabluz inal0 wORKN G
Rt Loop vasable b amugned
E n CL 2, 31: St uaue in A0q
pMiai la)
0p eReute auth amed
2
Value loop
3
Thew nest volue o augne=
Ex a io 3ang, 10, 2) e tiU all ualues
An Re ae paocessed.
pMnt a)
op Range
List
f uad age

NESTED LDOP:-LooPTile anatheslee


Sni Lio Aange U, 1D,2) Weskiap
is Aarge l , i) Lane eo 1)
execudee!C4
pALnt (" valee aLLnec 2)
Paid valuue 6ouule losp s )
odl cha nge Oy afteL
Annen lepb combletety
Date
nise
Teacher'sSignature:
Kange f -uaed uith foy Leep.
Expt. No genesateo iot uwhieh i apocialRenge tyfe

Saquen)_Ruccenin 6 luen baund gethe y


igle name EX Staing, Liattuplu
Spnia
pi hamge(<loue, lumit >, Suphe limtS,<step value
AGnfe L, u,s)
Aanae
Aaa l10) Ao,1, 2, 3,4,S,6. F,B. )
Aange , 5):(1, 2, 3,4.
AQngeLS,2) (1,3)

OR LoOP-bnoce AheÄtem d any ALQULMca Like

wORKING
RA Loop vauiable b angmed
= a u n L , 2, 31 st value in 4aq.
pMiat la)
Op eRecutel nuit asmpned
2
3
Veulue losp
Thew nes vale o aupne
Continmes till all ualuts
Ex a iosanga1, 10,2):
An Re ae processed.
bint la)
Range uaedov lage
List

NESTED LDOP LooPTRile anatheleep.


Sun lioAanga ll, 10,2): Weukiag
a AangaU, ) : Jane eoh execated
pAint A*)_ AValue o aLned,3)
Value ouler loDp 4,Ss)
wdl cha nge ny afte
Anner lepp o cmbletely
intse
Date- Teacher'sSignature

You might also like