Page 129 - KEC Khaitan C8 Flipbook
P. 129

PROJECT NAME: 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.









                                                                                                 Hands-On Project  127
   124   125   126   127   128   129   130   131   132   133   134