Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 128 - 2615_KEC
P. 128

    PROJECT 2: Activity on Operations on Lists

                      Software Used: Python Editor

                      Objective:
                      Develop a Python program to explore and perform various operations on lists. This project helps

                      build foundational knowledge of data manipulation using Python lists.
                      Platform:

                         ∑  PyCharm

                         ∑  Google Colab: https://colab.research.google.com/ (Login with your school email ID)

                      Step-by-Step Instructions

                      Plan IPO Framework:

                      Step  1   Input:

                                    Declare and initialize static lists (dynamic—each user can create unique lists with
                                   their own data).

                      Step  2   Process:

                                   Perform the following operations:

                                   1.  Append:

                                      o  Add an element to the end of the list.
                                   2.  Extend:

                                      o  Add all elements of another list to the current list.

                                   3.  Insert:

                                      o  Insert an element at a specified index.

                                   4.  Remove:

                                      o  Remove the first occurrence of a specific element.
                                   5.  Pop:

                                      o   Remove and return an element at a given index (or the last element if no index
                                          is specified).

                                   6.  Index:

                                      o   Return the index of the first occurrence of an element.

                                   7.  Count:

                                      o  Count the occurrences of a specific element.

                      126   Premium Edition-VIII

| 123 124 125 126 127 128 129 130 131 132 133 |