Easy
Math for AI• Vectors
Compute the L2 norm of a vector
Given a list of numbers, compute its L2 (Euclidean) norm: sqrt(sum(x_i^2)).
Input: One line of space-separated numbers.
Output: The L2 norm (a single number). Round to 2 decimal places for comparison.
Example:
- Input:
3 4 - Output:
5.0(sqrt(9+16) = 5)
Sample Test Verification
3 Test CasesSample Input (stdin)
3 4
Expected Output (stdout)
5.0
solution.py
Pyodide v0.26.4 WASM
Initializing Monaco Python Environment...
Input (stdin)
3 4
Expected Output (stdout)
5.0