Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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