SkyAICampus
HomePracticeLearnCode LabFocus

Learn

HomePracticeConcept cardsCode LabSky Tutor

Review

Revise todayMistake notebookProgress

Focus

Campus ForestFocus roomsSquads

Questions or feedback?
support@skyaicampus.com

Keyboard shortcuts

  • Choose an answer1–4 or A–D
  • Check, then next questionEnter
  • Next hintH
  • Search cardsCtrl K

How this quiz adapts

3 fast right answers in a row: the next questions get harder. 2 wrong in a row: a little easier.

Hints and guesses still count, just a little less, so use them whenever you're stuck.

Sky Tutor

Stuck on an idea? Ask in your own words, or by voice.

Ask Sky Tutor
SkyAICampus
PrivacyTermssupport@skyaicampus.com© 2026 SkyAI Campus

New skill. A one-minute read first, then the question.

60-second card

Creating arrays

A NumPy array is a grid of numbers of one type, built for fast maths.

  • np.array([1, 2, 3]) turns a list into an array.
  • np.zeros(3), np.ones((2, 3)) and np.arange(0, 10, 2) make arrays quickly.
  • np.linspace(0, 1, 5) gives 5 evenly spaced numbers.
import numpy as np
print(np.arange(0, 10, 2).tolist(), np.zeros(3).tolist())

Prints

[0, 2, 4, 6, 8] [0.0, 0.0, 0.0]

Remember: import numpy as np, then build arrays with np.something().

Common mistake: Expecting np.arange(0, 10, 2) to include 10. Like range, it stops before the end.

Log inSign up