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.
Nesta página do site você pode assistir ao vídeo on-line If Else Statement in Python | Python Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Mahjabin Chowdhury 01 Abril 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 58 vezes e gostou 7 espectadores. Boa visualização!