Page 89 - Touchcode_C6_Flipbook
P. 89
3. A loop does not allows you to execute a statement or group of statements
multiple times.
4. A nested loop is helpful in case if you are working on one condition.
5. When the looping condition is true the code will enter into a loop.
6. And operator returns true if all the conditions are true.
7. Or operator returns true even if one of the condition is true.
8. Not operator returns true if the condition is true.
C. Fill in the blanks.
1. Relational operator returns 1, if the value is ........................... .
2. ........................... relational operator means equal to.
3. ........................... operator is used to check if two or more conditions are true.
4. The loop condition is checked on the basis of the loop's ........................... variable.
5. The loop execute when the condition is ........................... .
6. To run a block of code in a loop, you need to set a condition and its number of ...........................
7. If there is another if-else construct within the if block or the else block, this is called
........................... .
8. By using ........................... code becomes easier to understand.
D. Match the following:
1. TRUE a. 0
2. FALSE b. a is less than b
3. a < b c. 1
4. a >= b d. OR
5. || e. a is greater than or equal to b
E. Answer the following questions:
1. What are logical operators?
2. Explain by giving an example on how to combine different logical operators.
3. What do you understand by the term increment loop?
4. Write any two benefits of loop.
5. Explain AND logical operator.
6. Write one difference between AND and NOT logical operator.
7. Explain any two relational operators.
Test Sheet 2 87

