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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started