What are if Statements?
If Statements are a way to control the ‘flow’ of a program depending on whether certain conditions are True.
They are written in the following way:

If Statements in Python – Example 1
The program below will output You’re a wizard. This is because the condition is met so the program does whatever is indented underneath it.

== is a comparison operator. It means to check whether one side is equal to the other (the same thing).
If Statements in Python – Example 2
The program below will output nothing.
This is because the condition has NOT been met

Alternative conditions checked with ‘elif’
Elif is used for any additional conditions other than the first one.
Depending on what you want to achieve, you can have zero, one or many elifs
Depending on what the user enters, the program below MAY or MAY NOT not tell them they’re too young to vote.

The use of ‘else’ condition to deal with none of the above conditions being True.
Else is used for for what you want to happen if none of the above conditions are True
Depending on what you want to achieve, you can have zero or one else.
