Page 2 - Home Assignment - STRINGS
P. 2

Home Assignment




               Write Python Program for the following:
                   1.  Write a program to count number of vowels in a string.

                   2.  Write a program to check if a string is palindrome or not.
                   3.  Write a program to count the number of words in a string.

                   4.  Write a program to count the number of substrings in a string.
                   5.  Write a program to count a specific word in a string.

                   6.  Write a program to capitalize each word of a string.
                   7.  Write a python function to reverses a string if its length is a multiple of 4.

                   8.  Write a python program to reverse words in a string.
                   9.  Write a python program to find the maximum occurring character in a given string.

                   10. Write a program to read a string and find the longest and smallest word in the string.

                   11. Write a program that reads a string and then prints a string that capitalizes every alternate
                       letter in the string.
                       If the input string is:   computer

                       It should print:            CoMpUtEr
   1   2