
SELECTION STATEMENTS
IF-ELSE

NESTED-IF

Multi Way Selectors
Multiple way selectors allow the selection of one of any number of statements or statement groups. Python uses IF-ELIF-ELSE statements for decision making.
ITERATIVE STATEMENTS
The “for” loop will iterate once for each item defined in the list passed to it at the beginning of the loop. Below, we will use the first example in the picture to explain this process. For the first time, the “for” loop will iterate the target variable “name” and the first item of value “Jack” in the list will be assumed. Then, this process will keep continue until it reaches the end of the list which is “Emily”.
Counter-Controlled Loops

We use while loop as a logically-controlled loops example since Python does not have do… while loop statement. We first initialise a default value as ‘0’ for the counter. Then, the while loop condition statement will check whether the counter is less than 4, and if this is true, it will print the Hello World! statement. At the end of the loop body, it will update counter by incrementing by 1. This process will keep continuing to print the “Hello World!” statement until the counter is not less than 4.
Logically-Controlled Loops

