medium +22 pts

L2 norm of vector

Return Euclidean length.

Implement `l2_norm(v: list[float]) -> float` using sqrt(sum(x*x)). Constraints: Pure Python lists only (no numpy import required in browser).

Constraints

Pure Python lists only (no numpy import required in browser).

Example

>>> l2_norm(...)
# see tests
22 points ~20 min

Recent Submissions

No submissions yet — hit Run Tests to try!

Hints

Think element-wise across aligned indices.
Handle empty inputs before loops.
Python 3
All tests passed!
Test Results
Press Ctrl+Enter or click Run Tests to execute your code.