about | help | code help+videos | done | prefs |
Write a function that takes a 2D list grid of numbers and then computes a new list L, where L[r] is the sum of all entries in row r in grid. sumRows([[1, 2, 3, 4], [0, 5, 2, 1], [3, 3, 2, 0], [0, 0, 4, 8]]) → [10, 8, 8, 12] sumRows([[-1, 6, 3, -4], [0, 0, 0, 0], [13, -3, 22, 10], [4, 9, -4, 5]]) → [4, 0, 42, 14] sumRows([[6]]) → [6] ...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