Question 1: Python Object Identity & In-Place Mutability
In Python, when executing the following snippet:
a = [1, 2, 3]
b = a
b.append(4)What is the value of
a and what is the underlying memory reason?Prerequisite Diagnostics
Assess Python fundamentals and mathematics intuition to identify gaps, verify skip eligibility, and schedule targeted reviews into planned review days.
Review items are scheduled into planned weekly review days (Day 07 / Day 14, 480 min budget each). Total mandatory curriculum hours remain exactly 720 hours.
Selecting a skip option without passing an independent diagnostic does not certify mastery. All skip recommendations require demonstrated evidence.
In Python, when executing the following snippet:
a = [1, 2, 3]
b = a
b.append(4)a and what is the underlying memory reason?When structuring code for autograd or machine learning pipelines, why are pure functions (functions whose outputs depend only on explicit arguments and do not mutate global variables) strongly preferred?
For a loss function $L(w) = w^2 - 4w + 4$, the derivative is $L'(w) = 2w - 4$. If current parameter is $w = 3$, what is $L'(3)$ and how should $w$ be updated to reduce loss?
In a neural network linear layer $Y = XW$, input batch $X$ has shape $(32, 128)$ and output $Y$ must have shape $(32, 64)$. What must the shape of parameter matrix $W$ be?
In classification, why does cross-entropy loss $-\log(p_{\text{true}})$ penalize a prediction of $p_{\text{true}} = 0.01$ exponentially more than $p_{\text{true}} = 0.50$?