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
- What does
[x * 2 for x in range(4) if x != 2]evaluate to? a = [1, 2]; b = a; b.append(3). What isa?- Write a function
mean(values)that returns the average of a list of numbers.
B. NumPy and pandas
- What is the shape of
np.zeros((3, 4)).sum(axis=0)? - Which pandas method gives the mean of column
scorefor each value of columngroup? - Have you used NumPy or pandas before? (never / in a tutorial / in a project)
C. Linear algebra
- Compute $\begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix} \begin{pmatrix} 3 \\ 4 \end{pmatrix}$.
- If $A \in \mathbb{R}^{2 \times 3}$, what is the shape of $A^\top A$?
- What does it mean for a square matrix to be invertible? One sentence.
D. Calculus and probability
- Find $\frac{d}{dx}(3x^2 - 2x)$ and the $x$ where it equals 0.
- A fair die is rolled once. What is $P(\text{result} \ge 5)$?
- Mean of $(2, 4, 9)$? Which is more affected by one extreme value, the mean or the median?
E. Tools
- What does
git commitdo? One sentence. - What is a virtual environment for? One sentence.
- Which operating system is on your laptop, and can you install software on it?