0 / 34

Invite others

Progress

0 / 34

Engineering Equation Solver

📋 Context

You're an engineer solving a system of equations from a circuit analysis. Three loops in a circuit give you 3 equations with 3 unknowns (currents). This is exactly what np.linalg.solve is built for.

1
2

Step 1: Set Up the System

🎯 Task

The equations are:
2I₁ + I₂ - I₃ = 8
-I₁ + 3I₂ + 2I₃ = 1
I₁ - I₂ + 4I₃ = 11
Create coefficient matrix A and constants vector b. Print both.

A = np.array([[2,1,-1],[-1,3,2],[1,-1,4]]), b = np.array([8, 1, 11])
exercise.py
⌘⏎ run · ⌘← → nav
Output
Run your code to see output here.