Pixel Grid (Problem 42) - InfyTQ Solution in Python

Pixel Grid (Problem 42)

InfyTQ Solution in Python




PROBLEM STATEMENT

CSE160-Midterm-2015 Spring

Write a function maxvalue_in_column(pixel_grid)
that, given a list of lists of integers, creates a list of integers that includes the maximum value found in each column of pixel_grid.

You can assume that pixel_grid will always contain at least one row and one column and that the values in pixel_grid will be between 0 and 255 and that each row will contain the same number of columns.

Here are a few examples. After the following code is executed:


If pixel_grid contains Col_list will be
[ [ 4, 2, 3], [16, 5, 0], [ 3, 200, 6], [ 0, 10, 12] ] [ 16, 200, 12 ]
[ [ 4 ], [ 16 ], [ 3 ], [ 0 ] ] [ 16 ]
[ [ 4, 2, 3] ] [ 4, 2, 3 ]
[ [6] ] [ 6 ]




SOLUTION
SHARE If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
Newer Posts Newer Posts Older Posts Older Posts

More posts

Comments

Post a Comment

Sponsored Content