Page 157 - 2622_Delhi Police Public School_C-8
P. 157

TEST SHEET  2                         (Based on chapters 6 to 9)








                 A.  Choose the correct option.

                    1.   Which of the following is a looping statement in Python?
                               a. for statement                                  b. continue statement


                               c. if statement                                   d. break statement

                    2.     Block of organised and reusable code used to perform a single or related action is called ___________ .

                               a. function                                       b. string

                               c. statement                                      d. arguments

                    3.   A list within a list is called nested list. Cite 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]

                    4.  Output of print(“Hello” + “How are you “) statement is

                               a. Hello How are you                              b. HelloHowareyou

                               c. HelloHow are you                               d. HELLO HOW ARE YOU

                    5.   Visiting each element and processing it as required by the program is called ___________ .

                               a. functions                                      b. strings

                               c. traversing                                     d. indexing


                    6.     Identify the network device that allows the data to flow between two different networks and performs
                        spam filtering.

                               a. Gateway                                        b. Switch

                               c. Hub                                            d. Router


                    7.   Identify what is not the component of Python function.
                               a. Arguments                                      b. Return value

                               c. Name of the function                           d. Escape sequence


                    8.   Which function is used to add an element in a list?
                               a. extend()                                       b. count()


                               c. append()                                       d. add()





                                                                                                     Test Sheet 2  155
   152   153   154   155   156   157   158   159   160   161   162