CPSC120A
Fundamentals of Computer Science I

Post-lab 30

Two-dimensional Lists

Post Lab 30

Write a function called sum_major_diagonal(a_matrix), which takes a square 2-d list as a parameter. Your function should return the sum of the elements along the major diagonal.