Python Sandbox
Generate Python and execute it in-browser via Pyodide (WebAssembly).
Loading Python runtime...
AI Prompt
Write a script using NumPy to find eigenvalues of a 3x3 matrix.
Generate Python
Editor
import numpy as np A = np.array([[4, -2, 1], [-2, 4, -2], [1, -2, 3]], dtype=float) eigvals, _ = np.linalg.eig(A) print("Eigenvalues:", np.round(eigvals, 4))
Run Code
Copy
Terminal Output
$ awaiting execution...