Question: Write a Python function filter_evens () that takes the list of integers as input, and returns a new list containing only the even numbers
Write a Python function filter_evens () that takes the list of integers as input, and returns a new list containing only the even numbers from the original list, sorted in ascending order. Example usage: input_list = [5, 2, 7, 10, 8, 3, 4] output_list = filter_evens (input_list) print (output_list) Expected output if you execute the example above: [2, 4, 8, 10] [ ] : 1 # your code here 2 raise NotImplementedError [ ] : 1 assert filter_evens 2 assert callable(filter_evens) 3 [ ]: 1 # this cell is being used in testing of your solution, do not edit or delete it. 2 3 [ ] : 1 # this cell is being used in testing of your solution, do not edit or delete it. 2 3 Activate W Go to Settings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
