Basic Programs of String Datatype in Python (solved) -part 1

Share with others

Important Programs of String Datatype in Python

String Datatype
String Datatype

Q1. Write a program to accept a string and display its length.

Q2. Write a program to accept a string and count number of vowels.

Q3. Write a program to accept a string and display it in reverse.

Q4. Write a program to check whether an input string is palindrome or not.

Q5. Write a program to count number of small case alphabets in String.

String Datatype
String Datatype

Q6. Write a program to count the number of words in the input string.

Q7. Write a program to accept a string from the user and count the frequency of alphabet ‘a’ and ‘c’.

Q8. Write a program to display the last word of the string accepted from user.

Q9. Write a program to display those words from the string in python which are starting from alphabet ‘a’ or ‘A”.

Q10. Write a program to count number of digits in a string accepted from user.

String Datatype
String Datatype

Disclaimer : I tried to give you the correct code of all the above “String Datatype Python Practice ” programs, but if you feel that there is/are mistakes in the code given above, you can directly contact me at csiplearninghub@gmail.com. Also Share your feedback 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

Class 12 Computer Science Test Series


Share with others

Leave a Reply

error: Content is protected !!
%d bloggers like this: