Class 11 Important Python String Programs for practice-Part 3

Share with others

Class 11 Important Python String Programs

Q21. Write a program to accept a string and display the string with second alphabet of each word in upper case.

Q22. Write a program to accept a string and display the word which has vowel ‘a’ in it.

Q23. Write a program to accept the first name from the user and display it as much times as its length.

Q24. Write a program to accept any string from the user and display it in the following pattern

if the string entered is “Python String Programs” then the output should be

Python
Python String
Python String Programs

Q25. Write a program to accept a string from the user and display the string without space.

Q26. Write a program to accept a string and substring from the user and display the frequency of substring in string.

Q27. Write a program to replace all ‘a’ in a string by symbol ‘@’.

Q28. Write a program to accept a string and substring from the user and check whether the substring is existing/present in string or not.

Q29. Write a program to accept a string from the user and display n characters from the right of the string. (Accept n from the user)

Q30. Write a program to accept a word from the user and display it in the following pattern.

if the word is “river” then it should display as shown below

r
r i
r i v
r i v e
r i v e r

Disclaimer : I tried to give you the correct code of all the python string programs, but if you feel that there is/are mistakes in the python string programs given above, you can directly contact me at csiplearninghub@gmail.com. Also Share your valuable feedback about the above Python String Programs or any other suggestion so that I can give better content to you.

Class 12 Computer Science Sample Paper 2020-2021.

Class 12 Computer Science Sample Paper Marking Scheme

CBSE Class 12 Board Exam Date Sheet 2020-21


Share with others

Leave a Reply

%d bloggers like this: