Class - VIII
CHAPTER -5 (GET CREATIVE WITH LOOPS)
WORSHEETS
Objective Type Questions
Question 1 Which type of loop can be used till a condition is met?
Option 1 While loop
Option 2 For loop
Answer: Option 1
Question 2 Which type of loop can be used to iterate over a sequence?
Option 1 While loop
Option 2 For loop
Answer: Option 2
Question 3 Which statement is used to break the loop?
Option 1 Stop
Option 2 Break
Option 3 Exit
Answer: Option 2
Standard Questions
1. What are the different types of loops?
Answer:
- While Loop
- For Loop
- Nested Loop
2. What is exit criteria?
Answer:
- Exit criteria is defined as a condition that must be met before completing a specific task.
- It is a set of conditions that must exist before you can declare a program to be complete.
- Exit criteria is one of the most important components while defining a loop.
- As without an exit criterion, the program tends to enter in an infinite loop.
- These criteria differ from program to program as per the requirement.
3. What is exit criteria for While loop?
Answer:
- Exit criteria is defined as a condition that must be met before completing a specific task.
- It is a set of conditions that must exist before you can declare a program to be complete.
4. What is exit criteria for For loop?
Answer:
- As without an exit criterion, the program tends to enter in an infinite loop.
- These criteria differ from program to program as per the requirement.
5. What are nested loops?
Answer:
- Nested loop is a loop that occurs in another loop.
- When we nest one loop within another, the outer loop takes control of the total number of complete repetition of the inner loop.