Question: String user _ entry is read from input with leading and trailing whitespaces. Remove any leading and trailing whitespaces in the string. If user _
String userentry is read from input with leading and trailing whitespaces. Remove any leading and trailing whitespaces in the string. If userentry contains the string 'Class: capitalize all the characters in userentry. Otherwise, lowercase all the characters in userentry. Finally, print out the resulting string.
Click here for examples
Ex : If the input is:
Class: Microbiology
then the output is:
CLASS: MICROBIOLOGY
Ex : If the input is:
Creative writing
then the output is:
creative writing
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
