Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
22 views
Conditionals - Boolean Values, Operators, If, If-Else, If-Elif-Else
Uploaded by
Sabaresan Venugopal
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 1. Conditionals - boolean values, operators, if, i... For Later
Download
Save
Save 1. Conditionals - boolean values, operators, if, i... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
22 views
Conditionals - Boolean Values, Operators, If, If-Else, If-Elif-Else
Uploaded by
Sabaresan Venugopal
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 1. Conditionals - boolean values, operators, if, i... For Later
Carousel Previous
Carousel Next
Save
Save 1. Conditionals - boolean values, operators, if, i... For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 13
Search
Fullscreen
Umt-3. ¢ Corthal flo {neltons ond Ss @ | Cond Renal © Boolean \faluws and OPssafors, Cond? anal ry Peet Capt) 5 cholnad Condt tral CH eli}- else) Conditionals Boolean | \Vrolues . & Boolean Valu are True O% Folu - K Conditions seta “Maur Ot False - #-Opsrator tala ‘Wo \tolus 4 01 0- | y>> to==l0 yp aslo | Tue yp b-50 [>> to = = 20 arb | Folse False y>> True + Tout y~pach oe True >>> Taw k Faloe e>type Craue) Sy Teun - Teua clas" ooal’> 0 > type CFales) jer oF Tae A class’ bool! > 5 >> type Chae) b> oF Fale Tradhock Croat stant Call \oat) : 1c File “2 Qhdimy’, lire t, to < roduley | Nowy Error! naroe’ bwue! bs not deftrad - ‘Dacsaien Making Gtaturarl aN x Dectatn “Making ts The anttatpation o\; Conds Hons Dceusing during ths executin of O pegian and Spactfi actions, taken according te the Condi tans . Feu have The con fan a4 a type | dee am ceilhan asduras NnOM- Aero Qnd nen- null Valu os Tauty and Zeno ow Tull Value’ os Farge Valw- Al Conditrart J ce 1)... alee Chotned 3H : ath. alse Neated yee alse Tolne ‘} © mq 1: The genonal ae Ee Ye dockeion ea ¢ B used fo tut o Condt rons 4 The Sue Haters inside iy wil bo,erocut Adtemed Conditional Cr condita Ss beue a tL Ceondt ten): totems 1 Stodemont 1 Staternents - outgrde ~ hProblem . ees « Peoganm fo Provide dP Seat of, Re. 500: 1 the purchou araount fe ae Afian 2000 - Passchone 7 C Puichan >= 2000) Puachoae = Pun chose - 500 Paint CS araut to ae Purchare) > tot Cinput C*anles yous Purchone aro gut ")) Output ants Your Purchase amount Agoo arama 4° Pay AZo0 - | Pay oe Provide bonus rook of 5 af “the al b Sports. Contin Yous Mak out of too')) m= tnt (input . c= Toput Chanter Yours Costegory ale.') CC AD) os Cc=2@/)): me OS Paint Craik!) output ans Yas mak ow af) loo oT ony Your category als . 3 }monk be 2Bitenakve DheCUA Ve Nees @ Twos branchws 4 execution! 3h block and the block candttion Ss teut Ahotomortts Inside The ih eT the * posit ges axeuilid - Opt poet olfiaxine els tL Ceondttron 4): | Problem 3 Wak 3 ie to chock The hegahve aun nurbor & postive ¢ a= imtC Topat Center tnt Value") | 1}, Cars °): Pant C° Posttive number") alee : Paint C Ney nuraloes”) output Ents rt \ealue 25° Post hve Number - Ente mnt \falue —5) Negobive number -A-| Wah o ie to check the ae number f odd ox & a= int Cinput C “Ents mt Value") TL Carve a==0): Patt (“Even durober”) ele: Pant C° edd number”) output Enis tnt Value do Even numbes enh mt Value i odd number 5. Wak oO Proguom se chuck The jor not - que Yeos Nop oe Q= tat Crnput C“ Ents ant Value") a] Caves ==0): Print © Leap Yeon") Jalse « Pant C* Net Leap Yeost") | Ou nee tH vroluz 2020 JLeap Year lent ant Value aoal Not be op Naor= | Wate 0 Dee ts . | to sage! to check the pecs & eligible fox Volk Oge= mil twput (" Erker yous age") t\ Cage >= \a): eas C * ligne {ps \rote") Q\be Pant (° Not ie Ona Entir Yor og. aS Eltgtble os \rote Entry Your age It Not ote is \eole i Vote") check ‘the qe Bai tuo Nurnlarsa - ut C’ Ents oO Value")) a= tnt Cinp eran Gopat c"enhe b Value’) i, Ca>b): Punt C = Grseoctent”, a) alse: Paint C* Cyseotct”, b) output Erviy o Volw 10 Enty b Value 2° | Crseatint ao4 The alr}, Sp Short toe who % & This & Uaed to Check rnore Man TL the Condition 4 G False, st Candtit on 2 oly the xii bled oy Ove Faber: tran T one Cond?tm. 1} Coonan 4): Solved 1 checks ‘the alr} Ctandttion ad: all tre Condit Sia en tv grocutid- en} (eanattion 2) Os pot Staboent 3 ere Ahe Sexual \ : aly oly Pp soa er Only cw por! fe axecited according aie? = to “The Condit on . ane The 1} Hook Cox have Orly Wocke, Bees have eovulliple ale blo alseCe Problem - ( Wak oa ogee fo check The Fram Seay Syste monk = Trt Croput C* antes yo rmank -")) 1}, (now k >24n: Pant C“gsade : 0") alt Crmask >= 8: Pant C*gxade : ot") alt} Croask >= sty? Pant Coqrode: 8") ale) Crmosk >= 61): Paint C° grade « an alt| C rnonk > = 50): Print C’ grade : B”) reas _ Paint C* ee ~-RA’) ‘Outpa ane Yous Mok! 5 Qpode 26 onby Yor mork: 1 gad: 8 ants Yous mawk: 50 Ha ne lalate Oc Progam te chock The Teale eal F Coleus = Yput C* arity Coloust se drab rc len2") 1) Ccolous ene qyseert!) = Y Patnt C Gro") ali}, Ceolous == * Yellow"): D ant C°GET REBBY") jain: | Pant (“sro PY)S oulpah @Q ile calour of, beofje led: quan Go ontiy colous of twopkt LED. Yellow GET RE By. b wtb untir — Calowr 4, Saf fe Led: wed SToP Wak o ree tb Cora pan. agualtty hb tuo nutmbe x = tut Cloput (antes x Value :")) y= tot Cimpat C*antix ¥ Value :")) 1 Cx==¥): pant Cx and ¥ Oot aqua") alt, CAAY): Paant Cx Te Lins thon Y’) alse: pant Cx & epoattn than”) utp uitiv x Value: 10 antes Y value: 10 X and Y ave qual. gil % Value: too arty Y Valte. Aco x B lw. Thany lonty % Nala: aso antes Y Vol: 1a> xb 7 han y.- lalate 0 ram te The Rests of, quadxatic squat on. O= ‘ot Cropat cs enix & Values") b= tnt CFnpst Ctantix bb Value :")) c= mt Comput (grits ¢ Valu :")) d- (ib -4* 0%) TC sa Part C° zocks ant Gore Gnd Heol") als) (Aro): Pant C dh \padt sual zools”) dine: Punt C Fre aginay soos") ook gone o Nolue : | nay eS conte ¢ Nalw. | woot, an Some ond wal ane o Value: | ontir b Value: 3 ontes ¢ Valu. | di} jourd seal Boots onli oO \eolu. | entry b Value, > ant ¢ Value 3 4 coo omy sooth |Naated ‘ = 1) One Candtttcral can also ba nedid wrtthin another. As numb of Condt fica Can be nested Profde cra Onotfo - aa Conditim ts trae ck cheeks onto Candtiim 4 a beth The Condtitas Ore fave Shatorord / dotunent 2 gyeculed - 1) the Conds ftw orecutid olfwwine S = xteuitid b fo le Qhotoraertt vi eeeahm th Ctenathon 4): Gobo 4 Be: Statement 2 a alae * thotunent 3Problem - Walt o Pp Jo cheek Bigged Grama Thee nwunboe - as intC tn at C° ont the Voluo of a") be tt Cimpat centr The vale of 6) c= tnt Cinpak Cc antir the Value oh c’)) th Cab): ee : Paint C'the = ets» 0) else: Point C° the ~ no b', C) dle - 7 Cero: ia b pant Othe qquatst We 6) Q\ na: Print C* the eo no b," 0) Output, \ ants “the Value oh a 320 ants ‘the Valu of b 20 ante ‘tte \alw che 1 the eae no f& Ao Wsth o progtors to check “the ne tt Comput (" arti, The Volw of 02") " (Gi==0).: Pant C the nuroloe ts Zor”) ee number & Ze, He 03, -V! g\baz a} Care): Prot C’the numkes b Posthive") Q\ne! ; Paint C“the number pepub onter ‘The Valw of, ns 0 the numloes is Xero ane “tie Value of 9: (oo the number b Poathve antes The Value ope. -= the numbes bb ee Toliw 1 ¥Ain onltee }, Aolenwt bw oO Giaphie {pero ohh Glateraent ond Y Mow Can\ventunts i, wr teed to pelos Siropla took Suntan: do taak A } Condtiim ‘is tee slat do tosk B D> A=20 > b=40 ae i de> paint CY Biggest’, b) rcbra) ake print Brggest 1) 0) Brgest 40 >» a=bo : : cpt”) ye paint C Biggest 1» 1 Choad ela print C Brgqes ac Baggus bo
You might also like
Cs Notes
PDF
No ratings yet
Cs Notes
28 pages
fpl set A
PDF
No ratings yet
fpl set A
13 pages
Lab 2
PDF
No ratings yet
Lab 2
21 pages
C
PDF
No ratings yet
C
25 pages
python model practical..(set 4)
PDF
No ratings yet
python model practical..(set 4)
65 pages
Computer Training
PDF
No ratings yet
Computer Training
26 pages
Smart Interviews Notes
PDF
No ratings yet
Smart Interviews Notes
75 pages
BCP AB
PDF
No ratings yet
BCP AB
65 pages
Bhavya 4th February 2023 Notes
PDF
No ratings yet
Bhavya 4th February 2023 Notes
16 pages
Python Notes (1)
PDF
No ratings yet
Python Notes (1)
23 pages
C Language 1
PDF
No ratings yet
C Language 1
44 pages
Python Assignment 2
PDF
No ratings yet
Python Assignment 2
12 pages
C Programming Language
PDF
No ratings yet
C Programming Language
55 pages
Computer Science Notes
PDF
No ratings yet
Computer Science Notes
36 pages
Data Structures Unit 1 - SVS
PDF
No ratings yet
Data Structures Unit 1 - SVS
21 pages
18CS752-Python 4
PDF
No ratings yet
18CS752-Python 4
16 pages
Week 2-6
PDF
No ratings yet
Week 2-6
44 pages
Python Notes
PDF
No ratings yet
Python Notes
49 pages
python notes
PDF
No ratings yet
python notes
25 pages
DocScanner 18 May 2023 12-40 PM
PDF
No ratings yet
DocScanner 18 May 2023 12-40 PM
18 pages
SOUGATA SOO_ME_22_Computer Language Lab Assignment 1
PDF
No ratings yet
SOUGATA SOO_ME_22_Computer Language Lab Assignment 1
25 pages
Maths worksheet 2
PDF
No ratings yet
Maths worksheet 2
19 pages
Basic Handnote of CSE-101 Course
PDF
No ratings yet
Basic Handnote of CSE-101 Course
43 pages
Python Notes Handwritten
PDF
No ratings yet
Python Notes Handwritten
25 pages
Dec 13, Doc 1
PDF
No ratings yet
Dec 13, Doc 1
28 pages
Coding Notes - CS50
PDF
No ratings yet
Coding Notes - CS50
14 pages
Computer Science Practical Amit Bikram Mishra Class Xii Science A
PDF
No ratings yet
Computer Science Practical Amit Bikram Mishra Class Xii Science A
18 pages
CD Practical 6 To 10
PDF
No ratings yet
CD Practical 6 To 10
10 pages
AKU PPS Pyq 2019
PDF
No ratings yet
AKU PPS Pyq 2019
11 pages
Module 2 Part 1
PDF
No ratings yet
Module 2 Part 1
13 pages
Properties of Datatypes PDF
PDF
No ratings yet
Properties of Datatypes PDF
13 pages
Cremesc16 Minnie
PDF
No ratings yet
Cremesc16 Minnie
8 pages
Mcs 11
PDF
No ratings yet
Mcs 11
19 pages
all time favourites 1
PDF
No ratings yet
all time favourites 1
3 pages
Python question bank
PDF
No ratings yet
Python question bank
13 pages
Python 22616 Solved Manual (Join AICTE Telegram)
PDF
No ratings yet
Python 22616 Solved Manual (Join AICTE Telegram)
76 pages
Python Programs
PDF
No ratings yet
Python Programs
16 pages
R Programming Notes
PDF
No ratings yet
R Programming Notes
24 pages
python record_4
PDF
No ratings yet
python record_4
29 pages
PPS Ques Bank Answers
PDF
No ratings yet
PPS Ques Bank Answers
23 pages
python unit 1
PDF
No ratings yet
python unit 1
17 pages
Import: Numpy As NP
PDF
No ratings yet
Import: Numpy As NP
5 pages
C Language Notes-1
PDF
No ratings yet
C Language Notes-1
41 pages
Computer Work
PDF
No ratings yet
Computer Work
42 pages
C Programming Notes (Unit-1234A) First Sem
PDF
No ratings yet
C Programming Notes (Unit-1234A) First Sem
86 pages
Python Basics (Only Till If N Else)
PDF
No ratings yet
Python Basics (Only Till If N Else)
12 pages
Python CCBP Notes
PDF
No ratings yet
Python CCBP Notes
85 pages
Array - Notes
PDF
No ratings yet
Array - Notes
24 pages
Computer Programs Code
PDF
No ratings yet
Computer Programs Code
70 pages
Lsco Assignment
PDF
No ratings yet
Lsco Assignment
23 pages
Python-3 Basic Programs, Keywords, Math Module
PDF
No ratings yet
Python-3 Basic Programs, Keywords, Math Module
16 pages
C Language Handwritten Notes With Sample Codes
PDF
No ratings yet
C Language Handwritten Notes With Sample Codes
103 pages
Module 1
PDF
No ratings yet
Module 1
20 pages
The Choice
PDF
No ratings yet
The Choice
58 pages
Fahad Assignment 2-2024 2-32 PM
PDF
No ratings yet
Fahad Assignment 2-2024 2-32 PM
22 pages
Notesof C Language by Abhay Kumar Awasthi Till Recursion
PDF
No ratings yet
Notesof C Language by Abhay Kumar Awasthi Till Recursion
27 pages
MCS-011 Problem Solving and Programming
PDF
No ratings yet
MCS-011 Problem Solving and Programming
13 pages
10th CS Ch. - Compressed
PDF
No ratings yet
10th CS Ch. - Compressed
15 pages