Question: Complete the following function, negatives that takes a list, values, as a parameter and removes all negative numbers from the list. Return the values list

 Complete the following function, negatives that takes a list, values, as

Complete the following function, negatives that takes a list, values, as a parameter and removes all negative numbers from the list. Return the values list from the function. Use a while loop and a counter, i to go through the list and remove negative values (see p.262 for similar example). Ex: If the list is: [17,25,5,30,100,96,48,5,14,30] the returned list would be: [17,25,30,100,96,5,14] because we removed 5,48,30. You do not need to write a main() function. Only the function above that returns a value. Do not print anything out. 447874.3093288.qx3zqy7

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!