10 Important String Programs in Python for Practice with Solutions – Part 2

Share with others

String programs
String Programs

Important String Programs in Python for exams are given below:

Q11. Write a program to display the largest word from the string.

Q12. Write a program to accept a string and display it in upper case.

Q13. Write a program to display the unique words from the string.

Q14. Write a program to accept a string and display the ascii value of each character.

Q15. Write a program to accept a string and replace all spaces by ‘#’ symbol.

Q16. Write a program to accept two strings from the user and display the common words.(Ignore case)

Q17. Write a program to accept a string and count the frequency of each vowel.

Q18. Write a program to display the smallest word from the string.



Q19. Write a program to accept a string and display the string in Title case. (first alphabet of each word in upper case)

Q20. Write a program to accept a string and display the string with changed case.(Change upper case alphabet to lower case and vice versa)



PART – 1

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

Important Links :

Class 12 Computer Science Sample Paper 2020-2021.

Class 12 Computer Science Sample Paper Marking Scheme

Class 12 Computer Science Test Series


Share with others

Leave a Reply

error: Content is protected !!