Conditional statements are an important part of many programs. They allow logic control of our programs. There are three main conditional statement types in Python. If / Elif / Else conditionals, For loops and While loops.
IF / ELIF / ELSE Statements
The if statements allow us to check the truth of a statement or statements and apply logic to the various possibilities. The if statement is simple at its heart.
if (statement) : # do the following code # do this line as well# This line is NOT part of the if statement.
The statement starts with the 'if' keyword (the 'if' must be in lowercase) followed by the ...