Page 322 - AI Ver 1.0 Class 9
P. 322

8.  ZeroDivisionError error is a ………………………. .
              a.  Syntax Error                                   b.  Logical Error
              c.  Runtime Error                                  d.  Not an Error

            9.  Which of the following is a sequence of UNICODE characters?
              a.  Boolean                                        b.  Numbers
              c.  String                                         d.  Float

           10.  Which of the following is a data type that has two built-in values True or False?
              a.  String                                         b.  Boolean
              c.  Integer                                        d.  Float

           11.  Which of the following conditional statements is used to test multiple conditions?
              a.  if                                             b.  if…elif…else
              c.  if…else                                        d.  All of these

           12.  What will be the output of the following code?
              if(True):
                   print("Hello")
               else:
                   print("Hi")
              a.  Hello                                          b.  Hello Hi
              c.  Hi                                             d.  Nothing will print

           13.  If L1 = ['O', 'R', 'A', 'N', 'G', 'E'], then what will be the output of the following statement?
              print(L1)
              a.  ‘ORANGE’                                       b.  ['O', 'R', 'A', 'N', 'G', 'E']
              c.  'O', 'R', 'A', 'N', 'G', 'E'                   d.  None of these

           14.  Consider the following code:
              A = ["Orange"]
               B = ["Education"]
               C = A + B
               print(C)
               Which of the following will be the output of the preceding code?
              a.  ['Orange', 'Education']                        b.  ['Orange Education']
              c.  Orange Education                               d.  Orange + Education

           15.  If L1 = ['O', 'R', 'A', 'N', 'G', 'E'], then which of the following will be the output of the given statement?
              print(L1[::-1])
              a.  Prints the list as it is                       b.  Prints the list in reverse order
              c.  Prints the last element of the list            d.  Prints the first element of the list


        B.  Fill in the blanks.
            1.  A ………………………. is written in any programming language.

            2.  In ………………………. flow statements are placed one after the other.




                  320   Touchpad Artificial Intelligence-IX
   317   318   319   320   321   322   323   324   325   326   327