Question: phython program Write a Python function called to upper that accepts a string as parameter. Then the function calls the is_lower (from problem 2) to
phython program
Write a Python function called to upper that accepts a string as parameter. Then the function calls the is_lower (from problem 2) to determine if all the characters in the string are in lower case. If the return value from is_lower is False, then the to_upper function returns an empty string. Otherwise, converts all the characters in the string to upper case and returns it. Sample Input: to_upper("abcd") Output: ABCD" Sample input: to_upper(ABcd) Output: un
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
