Learn Python Programming 3: If Statements (Conditions)

preview_player
Показать описание
In this video we'll look at if statements.

They allow the code to branch based on a condition. They can be combined together into complicated nested if/elif/else blocks. We'll also look at the comparison operators.

I didn't mention in the vid but if/elif/else always follow the same order. They start with "if", followed by any number of "elif" and optionally a single "else" at the end.

Patreon:

FaceBook:

Music Channel:
Рекомендации по теме
Комментарии
Автор

Great Video on Python - I have made use of your C++ tutorials and now I am learning tips about Python from you - thanks so much.

rajcodes
Автор

1:10 no need in parentheses for conditions.

kirill_bykov
Автор

Nice tut! As an FYI, with Python, it is not required to put the condition of the if and elif in brackets. e.g. if j != 90: is OK.

luked
Автор

Great tut. Very similar to C. You don't need braces in C, or multiple lines if it is just one statement either. I wonder, is there a Python equivalent to C's switch?

NeilRoy
Автор

nice vid. the description says "int his" instead of "in this" lol.

TheWeepingCorpse
Автор

for some reason after an update of Windows 10 (within last few weeks) I don't have an option to open command prompt after right clicking, it shows powershell option instead

MichalMonday