Question: IMPORTANT: DO NOT IMPORT ANY PACKAGES Python3 Given a list of non-negative integers, count the appearances of the multiples of 4 and return the count.

IMPORTANT: DO NOT IMPORT ANY PACKAGES

Python3

Given a list of non-negative integers, count the appearances of the multiples of 4 and return the count. The multiples of 4 are the integers divisible by 4 (including 0).

You MUST solve this question with list comprehension. Your implementation should only return an expression. In other words, without the 79-character line length limit, your implementation should fit in exactly one line. No explicit loops (for loop or while loop) are allowed. Do NOT add any inline comments.

def count_even(nums): """ >>> count_even([1, 10, 3, 8, 9, 7]) 1 >>> count_even([1, 10, 3, 8, 9, 7, 13, 14, 2, 8, 0]) 3 >>> count_even([]) 0 """ # YOUR CODE GOES HERE #

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!