Home / Engineering / Problem Solving and Python Programming / Question

M

Mr. Dubey • 51.17K Points
Coach

Q.) ) for col in range(3)]

(A) [3, 6, 9, 16, 20, 24, 35, 40, 45]
(B) error
(C) [0, 30, 60, 120, 160, 200, 300, 350, 400]
(D) 0
Correct answer : Option (A) - [3, 6, 9, 16, 20, 24, 35, 40, 45]

Explanation:
 in the code shown above, we have used list comprehension to combine values of multiple matrices. we have multiplied the elements of the matrix b with that of the matrix a, in the range(3). hence the output of this code is: [3, 6, 9, 16, 20, 24,

Share

Discusssion

Login to discuss.