Question: Write a function, that accepts a list of integers as input and returns a new list containing only the even numbers greater than 1 0

Write a function, that accepts a list of integers as input and returns a new list
containing only the even numbers greater than 10 from the original list.
Write your function in two ways:
1) Use a for loop to iterate through the input list and explicitly appends the
qualifying numbers to the result list.
2) Implement a list comprehension approach.
Also write a script that prompts the user for a list, then calls your function and
prints the result list to the screen.
Submit your script, both functions, and the output they produce.
Output example:
Enter a list of numbers separated with space: 15-822151642
[22,16,42]

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 Programming Questions!