Page 242 - Robotics and AI class 10
P. 242

SECTION B (Subjective Type Questions)

        A.  Short answer type questions:

            1.  What is the use of sort() function of a list?
            2.  What are the key features of python? Mention various applications along with it.

            3.  What will be the output of the following statement?

              print([1, 2, 6] < [1, 2, 5])
            4.  What is tuple?

            5.  How will you create tuple with zero and first element?
            6.  Give a code to create 3 rows and 3 columns with all zeroes.

            7.  How can we install Pandas on a command line?

        B.  Long answer type questions:
            1.  What are important features of lists in Python?
            2.  Name different ways of deleting an element in a list.

            3.  How will you access tuple elements by index numbers? Explain with an example.
            4.  What is the difference between lists and tuples?

            5.  How can you access the values in tuple?
        C.  Competency-based/Application-based questions:                          #Coding & Computational Thinking

               Lakshi have a list of student names. Students = ['Alice', 'Bob', 'Charlie', 'David'].
               What does the following Python code do?

               Python Code: students.append('Eve')
               a. Adds 'Eve' to the beginning of the list.
               b. Removes 'Eve' from the list.

               c. Adds 'Eve' to the end of the list.
               d. Checks if 'Eve' is in the list.

        D.  What will be the output of the following programs?                     #Coding & Computational Thinking

             1.   tuple1=(3, 4, 6, 7)            2.   tup1 = ('sst', 'chemistry', 2010, 2022);
                 print(tuple1)                        tup2 = (1, 2, 3, 4, 5 );
                                                      print "tup1[0]: ", tup1[0];

                                                      print "tup2[1:5]:", tup2[1:5];
             3.   checks = (10, 20, 30)          4.   friends = ("Prakash", "Gurcharan", "Ajay",

                 # Multiply tuple                     "Sanjay")
                 total = checks * 3                   print(max(friends))
                 print(total)                         print(min(friends))
                                                      earnings = (5000, 7020, 400, 800)

                                                      print(max(earnings))
                                                      print(min(earnings))

              240     Touchpad Robotics & Artificial Intelligence-X
   237   238   239   240   241   242   243   244   245   246   247