Page 235 - Robotics and AI class 10
P. 235

• The default linewidth is 1 pixel.
                  • To access values in a tuple, use the square brackets along with the index number for reference.
                  • Elements of a tuple cannot deleted or removed, but we can delete the entire tuple by using the del keyword.
                  • String is a sequence of one or more ASCII/Unicode characters.
                  • Creating strings is a fundamental concept in Python programming. Strings are used to represent and manipulate
                  text data.
                  • Multiline strings in Python allow you to define strings that stretch over multiple lines.
                  • An escape sequence is a sequence of  Non-Printable Characters with special meaning.



                                                        Exercise




                                                     Solved Questions

                                             SECTION A (Objective Type Questions)
                  uiz

            A.  Tick ( ) the correct option.

               1.  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

               2.  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
               3.  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
               4.  Data visualisation library used for plotting graphs in Python is:

                  a.  DataFrame                                      b.  NumPy
                  c.  Random                                         d.  Matplotlib

               5.  ………………………. is a sequence of Non-Printable Characters with special meaning.
                  a.  Functions                                      b.  print()
                  c.  Escape sequence                                d.  Graphs


                                                         Introduction to Data and Programming with Python  233
   230   231   232   233   234   235   236   237   238   239   240