Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

''' 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

From Zero To Data Hero With Chatgpt

Authors: Andrew Wu

1st Edition

B0CQRJPXD9, 979-8989523009

More Books

Students also viewed these Databases questions