Page 95 - Plus V4 with Adobe class 8
P. 95
Choose the correct option.
1. The result of the computer’s decision for a will always be either a true or a false.
a. loop b. condition
c. Both a and b d. None of these
2. A loop is used to execute instructions or a block of code times.
a. two b. three
c. multiple d. infinite
3. What is an endless loop called?
a. Counting loop b. Conditional loop
c. Infinite loop d. None of these
4. Which condition results true if both conditions are true?
a. AND b. OR
c. Both a. and b. d. None of these
Q Answer the following questions:
A
1. What is a loop?
2. Write the difference between the following with an example of each:
a. AND condition and OR condition
b. counting loop and a conditional loop
3. Write an if condition to display “Yes” or “No” if it is Sunday today and a cricket match also.
4. Write an if condition to display “Yes” or “No” if it is a weekday today or your exam.
5. Write a program to check whether a given number is negative or positive. If the number is positive,
then print “Positive number”. If the number is negative, then print “Negative number”.
#Algorithmic Intelligence 93

