Question: 015 str methods: upper or lower Complete this function according to its docstring description. 1 8 . 2 def upper_lower(s: str) -> bool: Return True


015 str methods: upper or lower Complete this function according to its docstring description. 1 8 . 2 def upper_lower(s: str) -> bool: "Return True if and only if there is at least one alphabetic character in s and the alphabetic characters in s are either all uppercase or all lowercase. 3 4 5 6 7 8 >>> upper_lower ('abc') True >>> upper_lower ('abcXYZ') False >>> upper_lower ('XYZ') True 9 10 11 0 0.0 12 History Submit 012 2 Uppercase-ify Assume the variable message exists. Write a statement below so that message will refer to the uppercase version of its original value. 1 | -16 Find the first Complete the function below according to its docstring description. i def find_first_occurrence (msg: str, string_to_find: str) -> int: 2 ***Return the index of the first occurence of string_to_find or -1 if it does not occur, ignoring case. 4 5 >>> find_first_occurrence('October holidays: Halloween and Thanksgiving', 'H') 3 in ms, 6 8 7 8 >>> find_first_occurrence ('Because DEC 25 OCT 31', 'H') -1 >>> find_first_occurrence('hip hip hooray', 'ip) 9 10 1 11 12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
