1) What is a NumPy array? a) A collection of different data types b) A data structure that stores elements of the same data type in continuous memory c) A Python list with mixed values d) A dictionary-like structure 2) Which attribute returns the shape of a NumPy array? a) size b) dtype c) shape d) ndim 3) For the array arr = np.array([[10,20,30],[40,50,60]]), what is arr.size? a) 2 b) 3 c) 6 d) 12 4) Which attribute gives the total memory consumed by an array in bytes? a) arr.size b) arr.shape c) arr.dtype d) arr.nbytes 5) What is the output of arr[0,1] for arr = [[10,20,30],[40,50,60]]? a) 10 b) 20 c) 30 d) 40 6) Which operation is used to extract a part of an array? a) Indexing b) Aggregation c) Slicing d) Reshaping 7) What is the output of arr[:,1]? a) First row b) First column c) Second column d) Second row 8) Which method changes the shape of an array without changing its data? a) resize() b) reshape() c) split() d) concatenate() 9) What will a.reshape(2,3) do? a) Converts array into 3D b) Converts array into 2 rows and 3 columns c) Deletes elements d) Changes data type 10) Which function joins two arrays into one? a) split() b) join() c) concatenate() d) stack()

Tabela rankingowa

Motyw

Opcje

Zmień szablon

Przywrócić automatycznie zapisane ćwiczenie: ?