The if-else Loop and more
if-else Loop

Control statements with repetition statements, AKA loops, repeat an action. Each repetition is known as a pass or iteration.There are two types of loops– those that repeat an action a predefined number of times and those that perform the action until the program determines that it needs to stop. In this post, we are examining Python’s if-else loop.
The if-else statement is the most common type of selection statement. It is also called a two-way selection statement, because it directs the computer to make a choice between two alternative courses of action. The if-else statement is often used to check inputs for errors and to respond with error messages if necessary. The alternative is to go ahead and perform the computation if the inputs are valid.
Below is the Python syntax for the if-else statement:

The condition in the if-else statement MUST be a Boolean expression. That means the expression evaluates to either true or false. The two possible actions each consist of a sequence of statements. Note that each sequence must be indented after it’s corresponding colon.
if Statement
The simplest form of selection is the if statement. This type of control statement is also called a one-way selection statement, because it consists of a condition and just a single sequence of statements. If the condition is True, the sequence of statements is run. Otherwise, control proceeds to the next statement following the entire selection statement.

Multi-Way Selection Statement
The process of testing several conditions and responding accordingly can be described in code by a multi-way selection statement. Here is the syntax for a multi-way if statement:

Again, the indentation helps the human reader and the interpreter to see the logical structure of the control statement.