Question: Given the following function that counts how many even numbers are in a given list of numbers def countEvens (numList): count-0 for num in numList:

 Given the following function that counts how many even numbers are

Given the following function that counts how many even numbers are in a given list of numbers def countEvens (numList): count-0 for num in numList: ifnum % 2-0: count + 1 return count Modify the function so that instead it returns a list of numbers from numList that are divisible by a given number k. The function header would look like this: def divList (numbist, k): For example, if we have the function call: back divlist4123,24,29,33,17,21),3) [24,33,21] Be sure to click on the link to Show Rich-Text Editor and set your font to courier New. To make it easier to indent your code with spaces. Maximum number of characters (including HTML tags added by text editor): 32,000 acBook Pro

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!