Day 1 Diagnostic

Fifteen questions, 20 minutes, before Lecture 01 on Fri 4 Dec. Used to plan support, never graded. Learners answer on paper or a form; no AI, no searching.

Questions

A. Python

  1. What does [x * 2 for x in range(4) if x != 2] evaluate to?
  2. a = [1, 2]; b = a; b.append(3). What is a?
  3. Write a function mean(values) that returns the average of a list of numbers.

B. NumPy and pandas

  1. What is the shape of np.zeros((3, 4)).sum(axis=0)?
  2. Which pandas method gives the mean of column score for each value of column group?
  3. Have you used NumPy or pandas before? (never / in a tutorial / in a project)

C. Linear algebra

  1. Compute $\begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix} \begin{pmatrix} 3 \\ 4 \end{pmatrix}$.
  2. If $A \in \mathbb{R}^{2 \times 3}$, what is the shape of $A^\top A$?
  3. What does it mean for a square matrix to be invertible? One sentence.

D. Calculus and probability

  1. Find $\frac{d}{dx}(3x^2 - 2x)$ and the $x$ where it equals 0.
  2. A fair die is rolled once. What is $P(\text{result} \ge 5)$?
  3. Mean of $(2, 4, 9)$? Which is more affected by one extreme value, the mean or the median?

E. Tools

  1. What does git commit do? One sentence.
  2. What is a virtual environment for? One sentence.
  3. Which operating system is on your laptop, and can you install software on it?