Electric Circuits·unit-conversion-chain
Unit Conversion Chain
Given a quantity expressed in one set of units with multiple conversion factors (e.g., conductors, distance, weight per unit length, and mass ratio), chain together a series of unit conversions to obtain the final result in a target unit.
✓ All 2 test cases pass.
Inputs
Test cases
These cases run live in your browser every time the page loads. If any fail, the calculator is broken — file an issue.
| # | Inputs | Expected | Got | Status |
|---|---|---|---|---|
| 1 | {"num_conductors":4,"distance_miles":845,"weight_per_kft":2526,"lb_to_kg":2.2} | 20500000 | 20490912 | ✓ |
| 2 | {"num_conductors":2,"distance_miles":100,"weight_per_kft":1000,"lb_to_kg":2.2} | 481800 | 479999.99999999994 | ✓ |
APIDeveloper APICall this calculator from codeexpand ↓
Endpoint
POST
/api/calculators/electric-circuits/unit-conversion-chain/computeInputs (4)
num_conductorsintegerdefault4distance_milesnumberdefault845weight_per_kftnumberdefault2526lb_to_kgnumberdefault2.2
Example
curl -sX POST http://localhost:3001/api/calculators/electric-circuits/unit-conversion-chain/compute \
-H "Content-Type: application/json" \
-d '{"inputs":{"num_conductors":4,"distance_miles":845,"weight_per_kft":2526,"lb_to_kg":2.2}}'Try it live
Edit the body below, then click Call API.Request body
Response
(click Call API to see the response)Source: Pattern from: James W. Nilsson, Susan A. Riedel - Electric Circuits 11e - Instructor’s Solution Manual-Pearson (2019).pdf. Reproduces a standard unit-conversion-chain computation; problem text paraphrased.
AI disclosure: Calculator code generated by anthropic/claude-haiku-4-5-20251001; verified by 2 test cases.