
Homework
Calculate the sum of each column of a two dimensional array. For example
t = [[1, 2, 3],
[3, 7, 4],
[8, 3, 5],
[9, 10, 11, 12]]Then the output should be
res = [21,22,23,12]
Because for first column: 1 + 3 + 8 + 9 = 21, for second column: 2 + 7 + 3 + 10 = 22, for the third column: 3 + 4 + 5 + 11 = 23, for the fourth column, there is only one element, so the sum is 12.