CLASS - VIII | CHAPTER -4 ( GET CREATIVE WITH LOOPS ) [Worksheet]

Class - VIII
Chapter - 4 (Conditionals in Details)
WORSHEETS


Objective Type Questions 



Question 1 Which one of the following options is not a logical operator? 

Option 1 OR 
Option 2 WHAT 
Option 3 AND 
Option 4 NOT 

Answer: Option 2 


Question 2 Which of the following can create conditional statements?

 Option 1 IF 
Option 2 IF-ELSE 
Option 3 Nested IF-ELSE 
Option 4 All the above 

Answer: Option 4 


Question 3 Which operator negates a condition? 

Option 1 OR 
Option 2 NOT 
Option 3 AND 
Option 4 None of the above 

Answer: Option 2



Standard Questions 

1. What are different types of control structures? Define each type. 
Answer: There are three basic types of control structures in programming:
  • Sequential 
    • In a sequential control structure, the statements in a program are executed sequentially, i.e., step-by-step in an order that they are written.
  • Selection / Conditional
    • A selection (conditional) control structure is used to test a condition in a program. This control structure takes a decision to execute one statement/operation over another statement/operation depending on the condition.
  • Iteration
    • This control structure executes a set of statements for a certain number of times till the mentioned condition is true. Loops are examples of iterative statements.
 
2. What are the different types of relational operators? 
Answer: 

3. What are logical operators? Name different types of logical operators.
Answer: 


4. What are the differences between “AND” and “OR” operators? Give examples. 
Answer: 



5. What is a nested conditional statement and where is it used?
Answer: