MAYOOR SCHOOL AJMER
XI Computer Science / Assignment-9
1. WAP to count the number of vowels in a string input by the user.
2. WAP to count the length of a string given by the user.
3. WAP to reverse of a string.
4. WAP to change a given string to a new string where the first and last chars have been exchanged.
5. WAP to input a string and check whether the string is symmetrical or Palindrome.
6. WAP to input a string and a character and print whether the character is contained in the string or
not. Also display how many times the input character coming in the string.
7. WAP to change a given string to a new string where the first and last chars have been exchanged.
8. WAP to add ‘ing’ at the end of a given string (length should be at least 3). If the given string
already ends with ‘ing’ then add ‘ly’ instead. If the string length of the given string is less than 3,
leave it unchanged.
Sample String : ‘abc’ Expected Result : ‘abcing’
Sample String : ‘string’ Expected Result : ‘stringly’
9. WAP that reads a string and converts it to uppercase.
10. WAP that checks whether a given character is an alphabet or not. If it is an alphabet, whether it is
lower case character or uppercase character?
11. WAP that reads three strings (First name, Middle name, Last name) and concatenating all the
string.
12. WAP that reads a password and prints “OK” if the correct password is entered, otherwise print
“SORRY”. The user should be given three chances to type the password.
13. WAP that reads two strings and concatenate the smaller string into the bigger string.
14. WAP to display name in consecutive case fetched from the user.
15. WAP to fetch a name from the user in lowercase and store reverse of it in another string in
uppercase.
MAYOOR SCHOOL AJMER
XI Computer Science / Assignment-9
1. WAP to count the number of vowels in a string input by the user.
2. WAP to count the length of a string given by the user.
3. WAP to reverse of a string.
4. WAP to change a given string to a new string where the first and last chars have been exchanged.
5. WAP to input a string and check whether the string is symmetrical or Palindrome.
6. WAP to input a string and a character and print whether the character is contained in the string or
not. Also display how many times the input character coming in the string.
7. WAP to change a given string to a new string where the first and last chars have been exchanged.
8. WAP to add ‘ing’ at the end of a given string (length should be at least 3). If the given string
already ends with ‘ing’ then add ‘ly’ instead. If the string length of the given string is less than 3,
leave it unchanged.
Sample String : ‘abc’ Expected Result : ‘abcing’
Sample String : ‘string’ Expected Result : ‘stringly’
9. WAP that reads a string and converts it to uppercase.
10. WAP that checks whether a given character is an alphabet or not. If it is an alphabet, whether it is
lower case character or uppercase character?
11. WAP that reads three strings (First name, Middle name, Last name) and concatenating all the
string.
12. WAP that reads a password and prints “OK” if the correct password is entered, otherwise print
“SORRY”. The user should be given three chances to type the password.
13. WAP that reads two strings and concatenate the smaller string into the bigger string.
14. WAP to display name in consecutive case fetched from the user.
15. WAP to fetch a name from the user in lowercase and store reverse of it in another string in
uppercase.