Quiz di AI & Machine Learning: NumPy Arrays

This quiz checks the NumPy basics every data science and machine learning workflow uses. You will predict the output of short snippets that create, index, slice, filter and reshape arrays, and spot the one that fails.

Facile 10 domande ~5 minuti Superato con il 80%

Scegli una modalità

Stai giocando come ospite: accedi per salvare XP e serie.

Domanda di esempio

Domanda 1 di 10

What does this print?

import numpy as np
a = np.array([1, 2, 3])
print((a * 2).tolist())
Mostra la risposta

B. [2, 4, 6] NumPy applies * 2 to every element, so you get [2, 4, 6]. Repeating the items, [1, 2, 3, 1, 2, 3], is what * does to a plain Python list.

Cosa copre questo quiz

  • Element-wise math on arrays vs lists
  • shape, dtype and reshape()
  • Indexing, slicing and boolean masks
  • Slices are views, not copies
  • Summing along an axis

Domande frequenti

Serve un account?

No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.

Posso rifarlo?

Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.