Page 96 - Touchcode_C8_Flipbook
P. 96
Program 6: To print your name nine times using for loop with range() function.
Program 7: To print multiplication table of an input number.
THE WHILE STATEMENT
The while statement executes a set of statements repeatedly, until the logical expression
evaluates to true. When the condition becomes false, the control comes out of the loop.
The syntax of while statement is given below:
Syntax:
while (test expression): Test Expression False
Statements
True
Execute while Block
Exit loop
94 Touchcode-VIII

