Question: Please answer the following questions in basic python code. Please use comments where necessary. 6. input: a string with character in it, a string with
Please answer the following questions in basic python code. Please use comments where necessary.
6. input: a string with character in it, a string with numbers in it output: go through the two strings together. At index i, if the number in str2 is even, put the letter in str1 into evenStr if the number is odd, put the letter into oddStr. Return the even/odd strings Sample: "helloworld" "2435232399" gives evenStr="heoo" oddStr="llwrld" ''' #def two_strings(str1,str2)
7. The number 6 is a truly great number. Given two int values, a and b, return True if either one is 6. Or if their sum or difference is 6. Note: the function abs(num) computes the absolute value of a number.
love6(6, 4) returns True love6(4, 5) returns False love6(1, 5) returns True ''' #def love6(a,b):
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
