Question: ''' How do you create a function called countEven2D() to count even numbers from the function print2D(list) in python 3.6? I'm using visual studio community

''' How do you create a function called countEven2D() to count even numbers from the function print2D(list) in python 3.6? I'm using visual studio community 2017. This is what I have so far. ''' import random import math

def print2D(list): for row in range(0, 4): for col in range(0, 3): print(list[row][col],end = ' ') print('')

def countEven2D(b):

list = [[random.randint(0,25) for x in range(3)] for y in range(4)] # main() print2D(list)

OUTPUT: 22 25 15 10 24 23 8 0 18 19 21 1

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!