Page 168 - Code_GPT_Class_8
P. 168

TEST SHEET  2                          (Based on chapters 6 to 11)








              A.  Choose the correct option.

                 1.  What is the purpose of using the AND operator in an if statement?
                            a. It checks if both conditions are true          b. It checks if either condition is true


                            c. It checks if neither condition is true         d. It reverses the condition

                 2.  Which of the following best describes the process of looping?

                            a. Repeating the same operation indefinitely

                            b. Skipping over certain statements in a collection


                            c. Executing a sequence of steps until a condition is met

                            d. Randomly selecting statements from a collection


                 3.                  statement executes a simple or compound statement for a fixed number of times.
                             a. if statement                                   b. for loop


                             c. while loop                                     d. do while loop

                 4.   In Python, which statements are used to transfer control out of a loop, even if all the iterations have not
                     been completed?

                             a. break and skip                                 b. stop and continue

                             c. break and continue                             d. skip and resume

                 5.  Mark the built in functions from the given list.

                            a. show()                                         b. print()

                            c. myname()                                       d. display()


                 6.  Visiting each element and processing it as required by the program is called ___________ .
                            a. functions                                      b. strings


                            c. traversing                                     d. indexing

                 7.  A list within a list is called nested list. Mark an example of nested List.

                             a. name=[‘Meenu’, ‘Cheenu’]                       b. age=[14, 56, 23]

                             c. address=[‘Delhi’, 12’, ‘Noida’]                d. marks=[‘Ajay’,[99,98,97,96], ‘Jiten’, 98]






                        CodeGPT (Ver. 4.0)-VIII
                166
   163   164   165   166   167   168   169   170   171   172   173