Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 126 - 2615_KEC
P. 126

    HANDS-ON PROJECT

                      PROJECT 1: Activity on Operations on Strings

                      Software Used: Python Editor

                      Objective:
                      Develop a Python program to explore and implement various string operations. This project helps
                      you understand string manipulation techniques commonly used in programming.

                      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:

                                   Accept a string from the user (dynamic—varies with each user).

                      Step  2   Process:

                                   Perform the following operations on the string:
                                   1.  Concatenation:
                                      o  Combine the input string with another string.

                                   2.  Slicing:
                                      o  Extract specific portions of the string.
                                   3.  Length:

                                      o  Find the total number of characters in the string.
                                   4.  Uppercase:
                                      o  Convert all characters to uppercase.

                                   5.  Lowercase:
                                      o  Convert all characters to lowercase.
                                   6.  Replace:

                                      o  Replace a part of the string with another substring.
                                   7.  Strip:
                                      o  Remove leading and trailing whitespaces.

                                   8.  Find:
                                      o  Locate the position of a specific substring.

                      124   Premium Edition-VIII

| 121 122 123 124 125 126 127 128 129 130 131 |