Create a class CharacterClassStringClass. Ask the user to type 'y' for yes or 'n' for no. Read the input as String and test if the user type Y\y or N\n which are OK we display the message (you typed ' ' thank you!) If the user enters any other character except y,Y, N, n display the message (you typed ' ' incorrect character! If the user enters numeric input display the message (you typed ' ' incorrect and numeric!) If the user enters a string whose length is greater than 1 we display the message (you typed more than 1 character ' ' incorrect length)
Create a class CharacterClassStringClass. Ask the user to type 'y' for yes or 'n' for no.
Read the input as String and test if the user type Y\y or N\n which are OK we display the message (you typed ' ' thank you!)
If the user enters any other character except y,Y, N, n display the message (you typed ' ' incorrect character!
If the user enters numeric input display the message (you typed ' ' incorrect and numeric!)
If the user enters a string whose length is greater than 1 we display the message (you typed more than 1 character ' ' incorrect length)
Below is the complete solution with explanation in detail for the given programming question.
Note:- Here, the programming language is not mentioned. So, I am writing solution in Python Programming Language.
Step by step
Solved in 3 steps with 5 images