about | help | code help+videos | done | prefs |
Write a function that takes a 2D list grid and computes a new list L, where L[c] is the sum of column c in grid. To figure out the example cases, you might want to draw the 2D list on paper. sumCols([[1, 2, 3, 4], [0, 5, 2, 1], [3, 3, 2, 0], [0, 0, 4, 8]]) → [4, 10, 11, 13] sumCols([[6]]) → [6] sumCols([[6], [-3]]) → [3] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy