Page 34 - Touchcode_C8_Flipbook
P. 34
3. Any loop in a program may contain another loop inside it.
4. A looping condition must not get false at a certain point of time.
5. Exit criteria differ from program to program.
C. Fill in the blanks.
HELP BOX loops, multiple, complex, exit, organized
1. A loop executes a block of code ........................... times.
2. Loops make the code more manageable and ........................... .
3. While, For, nested are types of ........................... .
4. A nested loop is helpful in case if you are working on ........................... conditions.
5. ........................... criteria is a condition that must be met before completing a specific task.
D. Match the following:
1. While loop a. Repetitive task.
2. For loop b. Loop inside another loop.
3. Nested loop c. Condition that must be met before completing a specific task.
4. Loops d. Executes a statement or group of statements till a given
condition is true.
5. Exit criteria e. Iterating over sequence a specific number of times.
E. Answer the following questions:
1. What are the different types of loops?
.............................................................................................................................................................
.............................................................................................................................................................
2. What is exit criteria?
.............................................................................................................................................................
.............................................................................................................................................................
3. What are nested loops?
.............................................................................................................................................................
.............................................................................................................................................................
4. Write the difference between While loop and For loop.
.............................................................................................................................................................
.............................................................................................................................................................
32 Touchcode-VIII

