Question: Using python and a WHILE LOOP ONLY, TEMPLATES #PROBLEM 1 def everyOther(l1): list1 = l1 return 0 #YOUR CODE GOES HERE (indented) return l1 #END

Using python and a WHILE LOOP ONLY,

TEMPLATES

#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

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!