Company: Infoedge_IITM
Difficulty: medium
Given two numpy ndarrays A and B, both of shape (n, n), how do the * and @ operators behave when applied between them in Python? 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 these statements correctly describes a property of Python's built-in 'set' type? It is subscriptable It is not-subscriptable It is always mutable It is always immutable Given the nested list a = [[1, 2, 3], [1, 4, 5, 6], [2, 8]] in Python, which comprehension flattens 'a' into 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 does the code below print? x = [1,2,3,4,5] y = x y.reverse() y.extend([10,11]) print