If....Else Statement || Conditional Statements in python || Part - 2
In this video, I have discussed the basic If...else condition in python and its implementation.
Why do we need If...else conditional statements?
'IF' statement will be executed if a certain condition is correct but the else statement will be executed only when IF block is not executed that is when a given condition is wrong.
For example, when do we remove the charger from our mobile?
It is simple when it's 100% charged
similarly in code this logic as:
battery_percentage = 99
if battery_percentage == 100:
print("Charged, please remove the charger")
else:
print("Still Charging")
Видео If....Else Statement || Conditional Statements in python || Part - 2 канала Ddhruv Arora
Why do we need If...else conditional statements?
'IF' statement will be executed if a certain condition is correct but the else statement will be executed only when IF block is not executed that is when a given condition is wrong.
For example, when do we remove the charger from our mobile?
It is simple when it's 100% charged
similarly in code this logic as:
battery_percentage = 99
if battery_percentage == 100:
print("Charged, please remove the charger")
else:
print("Still Charging")
Видео If....Else Statement || Conditional Statements in python || Part - 2 канала Ddhruv Arora
Комментарии отсутствуют
Информация о видео
25 сентября 2021 г. 19:33:25
00:02:02
Другие видео канала