id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu all > testRemoveNegatives
prev  |  next  |  chance

Write a function removeValuesFromXtoYList(L,x,y) which returns a copy of the list L with all values between x and y exclusive REMOVED. Returns that list. (note codingbat does not detect if you destroy the original list, but in general, you should be careful and not do that.)


testRemoveNegatives([], -3, 3) → []
testRemoveNegatives([1, 2, 3, 4, 5], 1, 5) → [1, 5]
testRemoveNegatives([1, 3, -5, 10, -2, 0, -6.0, 0, 1], -3, 3) → [3, -5, 10, -6.0]

...Save, Compile, Run (ctrl-enter)

def testRemoveNegatives(L,x,y):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy