Python conditional statement
The journey towards becoming a PsU officer or pursuing MTech from IiT or other elite
institute is going to be long and challenging so for you to stay focused on your path. Here
are some confidence booster initiative by an academy. An academy is starting Udan batch
for Gate 2024 aspirant and Bunyad Bash for 2020. Five aspirants. So here an academy stop
educators will be teaching you in these batches. in a real life also every day. We are facing
these type of conditions and based on some conditions. We take decisions right like if you
go to supermarket and your mom say please bring some you can say buy some apple. in
real life. We are taking multiple you know many decisions every day so when we write
program then also obviously we will maybe we are working on a project. We 'll create some
product and all. So to map these decision making these things in programming, how you can
write down these things. Python basically use indentation to identify a block What is this
indentation like. If you write this statement, then after some space this space before you
know in the beginning of this line. This is known as indentation right so if we write condition
condition condition, you can write down in these brackets also or if you do not put these
brackets that is also fine in Python right. Both the cases are true, but this space is must
directly..
If height your child height child sided is uh greater than three feet, Let me just write down this
thing enter height in feet right so if height greater than 3. feet right Colon see as you can see
whenever the cursor is here and whenever y I will enter. I will press enter see automatically.
that is what indentation that is very important. if I write one more statement like print buy
token token and now you can board the metro right. this in this block right so I hope you got
this thing how to use if else now if simple if rather than else we have only one choice simple
if right no else part let's suppose remove the sales part comment this out if height is greater
than 3 then buy a token. if and if else statements and how to use them and indentation is.
Important. if we put space see here also in Python, it will give error. You can not put any
space before beginning of any line. You can put space after you know at starting of those
statement which are part of if block or else block right till now we have discussed till now..
The journey towards becoming a PsU officer or pursuing MTech from IiT or other elite
institute is going to be long and challenging so for you to stay focused on your path. Here
are some confidence booster initiative by an academy. An academy is starting Udan batch
for Gate 2024 aspirant and Bunyad Bash for 2020. Five aspirants. So here an academy stop
educators will be teaching you in these batches. in a real life also every day. We are facing
these type of conditions and based on some conditions. We take decisions right like if you
go to supermarket and your mom say please bring some you can say buy some apple. in
real life. We are taking multiple you know many decisions every day so when we write
program then also obviously we will maybe we are working on a project. We 'll create some
product and all. So to map these decision making these things in programming, how you can
write down these things. Python basically use indentation to identify a block What is this
indentation like. If you write this statement, then after some space this space before you
know in the beginning of this line. This is known as indentation right so if we write condition
condition condition, you can write down in these brackets also or if you do not put these
brackets that is also fine in Python right. Both the cases are true, but this space is must
directly..
If height your child height child sided is uh greater than three feet, Let me just write down this
thing enter height in feet right so if height greater than 3. feet right Colon see as you can see
whenever the cursor is here and whenever y I will enter. I will press enter see automatically.
that is what indentation that is very important. if I write one more statement like print buy
token token and now you can board the metro right. this in this block right so I hope you got
this thing how to use if else now if simple if rather than else we have only one choice simple
if right no else part let's suppose remove the sales part comment this out if height is greater
than 3 then buy a token. if and if else statements and how to use them and indentation is.
Important. if we put space see here also in Python, it will give error. You can not put any
space before beginning of any line. You can put space after you know at starting of those
statement which are part of if block or else block right till now we have discussed till now..