id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs111fall2019 > max2D
prev  |  next  |  chance

Write a function that takes as a parameter a 2D list grid of numbers, and computes the maximum number that appears in grid.


max2D([[1, 2, 3, 4], [0, 5, 2, 1], [3, 3, 2, 0], [0, 0, 4, 8]]) → 8
max2D([[-1, 6, 3, -4], [0, 0, 0, 0], [13, -3, 22, 10], [4, 9, -4, 5]]) → 22
max2D([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, -5, 0], [0, 0, 0, 2]]) → 2

...Save, Compile, Run (ctrl-enter)

def max2D(grid):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy