Esc101: Tutorial 8: 7Th March, 2017
Esc101: Tutorial 8: 7Th March, 2017
2. Sample questions:
- Take an integer matrix and print the sum of the elements in the boundary of the matrix.
- Take an integer square matrix and display the maximum element in row 1, 2nd max in
row 2, 3rd max in row 3 and so on.
- Display the following pattern for a given value of n ≤ 999. For example when n = 4,
display
1
2 4
3 6 9
4 8 12 16
You can use a placeholder such as %4d to display the integers.
- Multiply a matrix by a scalar OR a vector. (Don’t do matrix multiplication as it’s a lab
assignment.)
4. After 12:35pm you could return the midSemExam copies. Discuss the solutions briefly.
- If the students have any regrading requests, ask them to write on the front page of their
answer booklet and submit it back to you (same for totaling errors) immediately.
1
- Collect these (regrading) scripts back from the students and discuss with me before
changing their marks.
- The remaining students can take away their scripts.