Skip to course content
Free course

Data Analysis and Visualization with Python / Module 2

Module 2 check

Module 2 Assessment: NumPy Foundations Check

Assessment ID: DAV-M02-QA01 Estimated active time: 25-35 minutes

Part A: Short answers

  1. What does array shape tell you?
  2. What does dtype tell you?
  3. What is a boolean mask?
  4. Why is vectorized code useful?
  5. What does a random seed do?

Part B: Code check

Given:

import numpy as np

arr = np.array([
    [4, 8, 12],
    [5, 10, 15],
    [6, 12, 18],
])

Write code to:

  1. Select the second row.
  2. Select the third column.
  3. Select all values greater than 10.
  4. Add 2 to every value.
  5. Calculate one mean per row.
  6. Calculate one mean per column.

Rubric

LevelEvidence
PassCode uses array indexing, masks, vectorized operations, and correct axis logic.
ReviseCode mostly works but axis explanation or mask logic is unclear.
Not yetCode relies mainly on manual loops or guesses at row and column selection.