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

 

konstans@stuy.edu > averageColumn
prev  |  next  |  chance

Given a 2d List of integers. Calculate the average of each column and return a new list with each of the averages in order of the columns. You are guaranteed that each sublist has at least 1 value, and there is at least 1 sublist.


averageColumn([[83], [70], [98]]) → [83.66666666666667]
averageColumn([[83, 78, 91], [83, 82, 92]]) → [83.0, 80.0, 91.5]
averageColumn([[99, 70], [94, 99], [87, 71]]) → [93.33333333333333, 80.0]

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

def averageColumn(data):

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