Question 11 - Week 7 Practice | Prasnya
Prasnya
Continue with Google
Practice path
Dashboard
Exam
Qualifier / Quiz 1
Go to subject
Programing with python
Go to chapter
Week 7
Question 11
00:00
Est. 2 min
Marks:
+4.00
0.00
Select all matrices `M` for which the following code prints `True` to the console. ``` n = len(M) flag = True for i in range(n): for j in range(n): if (i != j) and (M[i][j] + M[j][i] != 0): flag = False print(flag) ```
Multiple correct
Medium Difficulty
16 October 2022
A
[[1, 2, 3], [2, 5, 4], [3, 4, 6]]
B
[[1, 5, 3, 4], [5, 1, 4, 6], [3, 4, 2, 8], [4, 6, 8, 3]]
C
[[1, 2, -3], [-2, 5, 4], [3, -4, 6]]
D
[[-1, 5, -3, 4], [-5, 1, -4, 6], [-3, 4, 2, 8], [-4, -6, -8, 3]]