Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Persuasive Speaking Organizing Patterns in Persuasive Speaking?

Answered: 1 week ago