Day 6: --------- Strings Questions(Theory): ------------------ 1.What is string in python? 2.What are the ways we can have to declare the string in python? 3.What is the function to identfy memory location? 4.How to find length of the string? 5.How to assign multiline String? 6.How to join two strings and how many ways? 7. What is mean by slicing operator and purpose? 8.How to compare two strings? 9.Difference between "==" and "is"? 10.What is the purpose of format() method? 11. What is mean by escape character? 12. What is the purpose of strip() method? Questions(practical) --------------------------- QUESTION 1: ----------- Description: Find the length of the below string String_1: GreensTechnology String_2: Python Programming String_3: s e l e n i u m String_4: 9876543210 String_5: Hi welcome to the world of programs QUESTION 2: ----------- Description:Find the index position String_1: Greens Technology Find the index of e String_2: Automation testing tool Find the index of testing String_3: Selenium automation using Python Find the index of automation and using String_4: Programming languages are c,c++,Java and Python Find the index of c Find the index of Java Find the index of Ruby Find the index of q and t QUESTION 3: ----------- Description:Using find method perform the below operations String_1: Selenium automation using Python Find the occurence of automation and using QUESTION 4: ---------- Description:Given String is "Welcome to Python class" and find the substring Input = "Welcome to Python class" Outputs: -------- e elco to Python to Python class And also try with negative scenarios QUESTION 5: ----------- Description:Find whether the string python is present or not using 'if' Input = Programming languages are c,c++,Java and Python if (s.find('Python') != -1): print("Contains substring 'Python'") else: print("Doesn't contain substring") QUESTION 6: ----------- QUESTION 6.1: ------------- Description: Given String as "Welcome to Python class" and split it by space. Example: -------- Input = Welcome to Python class Output: ------- Welcome to Python class QUESTION 6.2: ------------- Description: Given String as "Welcome to python class" and split it by l Example: -------- Input = Welcome to python class Output: ------- We come to python c ass QUESTION 7: ----------- Description:Find the count of word "is" Input: "Python is awesome and it is dynamic language" output: ------ 2 QUESTION 8: ----------- Description:Find the count of character 'm' Input:"Java programming and Python programming" Output: ------- 4 QUESTION 9: ------------- Description:Get the input from the user and find the count of character 'o' Input:"Hi welcome to the world of programs" Output: ------- 5 QUESTION 10: ---------- Description: Given String as "Welcome" and count the number of consonants and vowels Example: --------- Input = Welcome output: ------- vowels = 3 consonants = 4 QUESTION 11: ------------ Description : Get two input strings from user and Compare Example --------- String_1 : Java String_2 : Java Example: -------- String_1 : Python String_2 : python QUESTION 12: ------------ QUESTION 12.1 ------------- Description: Given String as "Welcome to Python class" and verify whether the given string startsWith welcome Example: -------- Input = Welcome to Python class output = True QUESTION 12.2 ------------- Description: Given String as "Hai I am from Greens" and verify whether the given string startsWith welcome Example: -------- Input = Hai I am from Greens output = False QUESTION 12.3 ------------- Description: Given String as "Welcome to Python class" and verify whether the given string endsWith class Example: -------- Input = Welcome to Python class output = True QUESTION 12.4 ------------- Description: Given String as "Welcome to Python class" and verify whether the given string endsWith Python Example: -------- Input = Welcome to Python class output = False QUESTION 13: ------------ QUESTION 13.1 ------------- Description:Get the input from the user and print that word in lowercase Example: -------- Input = GREENS TECH Output = greens tech QUESTION 13.2 ------------- Description:Get the input from the user and print that word in Uppercase Example: -------- Input = greens tech Output = GREENS TECH QUESTION 13.3 ------------- Description:Get the input from the user and print the first letter in capital Example: -------- Input = selenium with PYTHON Output = Selenium with python QUESTION 14: ------------ QUESTION 14.1: -------------- Description:Remove the unwanted spaces from the given string Example: -------- Input = " Incredible India " Output = Incredible India QUESTION 14.2: -------------- Description:Remove the left side spaces from the given string Example: -------- Input = " Software Engineering " Output = Software Engineering QUESTION 14.3: -------------- Description:Remove the right side spaces from the given string Example: -------- Input = " Dynamic language " Output = Dynamic language Question 15: ------------ Description:Check whether the given inputs are isnumeric,isdigit and isdecimal Inputs: ------- s1 = "45" s2 = "¾" s3 = "4¾" s4 = "²" s5 = "1/4"