Company: Infoedge_IITM
Difficulty: medium
Given two numpy ndarrays A and B of shape (n, n) in Python, what can be said about the * and @ operators? A * B performs element-wise product, while A @ B performs matrix multiplication between A and B A * B performs matrix multiplication, while A @ B performs element-wise product between A and B Both A * B and A @ B performs element-wise product between A and B Both A * B and A @ B performs matrix multiplication between A and B Which of the following is a property of data type 'set' in Python? It is subscriptable It is not-subscriptable It is always mutable It is always immutable Given a list of lists a = [[1, 2, 3], [1, 4, 5, 6], [2, 8]] in Python, which of the following flattens 'a' such that b = [1, 2, 3, 1, 4, 5, 6, 2, 8]? b = [a2 for a2 in a for a1 in a2] b = [a1 for a1 in a2 for a2 in a] b = [a1 for a2 in a for a1 in a] b = [a1 for a2 in a for a1 in a2] What shall be the output of below code snippet? x = [1,2,3,4,5] y = x y.reverse() y.extend([10,11]) print(x) [1, 2, 3, 4, 5] [5