Загрузка...

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
Яндекс.Метрика

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять