Page 110 - Trackpad_V1_Book 8_Flipbook
P. 110
Program 4: To check the greatest of three numbers
You will get the following output:
ITERATIVE STATEMENTS
Iterative statements refer to the statements that are used to
repeat a task based on a given condition. These statements are Condition False
also known as looping statements. An iteration means one pass
of a loop. True
Python provides the following iterative statements:
Statement 1
(i) For loop (ii) While loop
Tick ( ) if you know this.
▶ A computer program is a set of instructions known as statements.
▶ A control structure is a programming language construct which affects the flow of the execution
of a program.
THE for LOOP
The for loop is a type of iterative statement that allows the user to repeat a set of statements
multiple number of times until a given condition is falsified. The for loop is commonly used when
the number of iterations is known. It is also the loop of choice for array manipulation and traversal.
108 Trackpad (Version 1.0)-VIII

