Assalamualaikum everyone.
In this video, I have discussed about if..else statement in python.
If else statement is a conditional statement.
In my previous video, I have discussed about if statement in python. If you are watching this video, I would highly recommend you to watch my previous part of this video to have a better understanding of if statement or conditional statement in python.
If statement is a conditional statement used to execute a certain block of code if a particular condition is satisfied.
If..else statement is a conditional statement used when there are multiple blocks of codes. And we can execute certain statements if condition is true and can also execute other statements if the condition is false.
Basically, if we use only if statement, we can execute a block of code only if the condition is satisfied.
But if..else statement allows us to execute either condition is satisfied or not satisfied.
If..else statement basically extends the if statement.
Below is the syntax of if..else statement:
if condition:
code1
else:
code2
Code1 gets executed if the given condition is True.
Code2 gets executed if the given condition is False.
In my video I have showed how you can execute a program which includes using if else statement. Watch the full video guys, so you can understand everything properly.
Thank you so much for being with me. Till we code again.
Sur cette page du site, vous pouvez voir la vidéo en ligne If Else Statement in Python | Python Tutorial durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Mahjabin Chowdhury 01 avril 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 58 fois et il a aimé 7 téléspectateurs. Bon visionnage!