Question: Using python, template: #PROBLEM 1 def everyOther(l1): list1 = l1 return 0 #YOUR CODE GOES HERE (indented) return l1 #END YOUR CODE #PROBLEM 2 def
Using python,
template:
#PROBLEM 1 def everyOther(l1): list1 = l1 return 0 #YOUR CODE GOES HERE (indented) return l1 #END YOUR CODE #PROBLEM 2 def remove(l1,l2): string1 = l1 string2 = l2 #YOUR CODE GOES HERE (indented) return string1 #END YOUR CODE
| Problem 1: | Write code that returns the sum of every other element in a list. You may not use any built-in functions/methods besides len() and .append(). (This was a homework problem) |
| Problem 2: | Write code that takes two strings from the user, and returns what is left over if all instances of the second string is removed from the first. The second string is guaranteed to be no longer than two characters. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
