Question: Create Python 3 code satisfying the conditions below: def shift_lower(s1, s2): shift_lower. This function must return a string containing the lowercase letters of s1 followed

Create Python 3 code satisfying the conditions below:

def shift_lower(s1, s2):

"""shift_lower. This function must return a string containing the lowercase letters of s1 followed by the lowercase letters of s2 followed by the uppercase letters of s1 followed by the uppercase letters of s2. Do not otherwise change the order of the letters (see the test cases below for examples).

Parameters:

s1 (str): A string of characters, potentially including non-letters that should be ignored

s2 (str): A string of characters, potentially including non-letters that should be ignored

Returns:

shifted (str): A string of letters or "" as per the description above.

"""

return

Test cases:

print('sort_two') test(shift_lower("", ""), "") test(shift_lower("a", "b"), "ab") test(shift_lower("b", "a"), "ba") test(shift_lower("123", "456"), "") test(shift_lower("My first name is Michael", "My last name is Nixon"), "yfirstnameisichaelylastnameisixonMMMN") test(shift_lower("123", "Mississauga"), "ississaugaM") test(shift_lower("Cityof", "Mississauga"), "ityofississaugaCM") test(shift_lower("Cityof123", "Mississauga"), "ityofississaugaCM") test(shift_lower("123Cityof", "Mississauga"), "ityofississaugaCM") test(shift_lower("Cityof123", "Mississauga"), "ityofississaugaCM") test(shift_lower("123Cityof", "Mississauga"), "ityofississaugaCM") test(shift_lower("hello", "world"), "helloworld") test(shift_lower("hello ", "world"), "helloworld") test(shift_lower("HELLO", "WORLD"), "HELLOWORLD") test(shift_lower("HELLO", "world"), "worldHELLO") test(shift_lower("H@#ell@o", "World"), "elloorldHW")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!