Code Challenge

Code Challenge

animation
electronics
Try In blank 1, choose the expression using r2 / (r1 + r2); in blank 2, select round(v_out, 3).
Observe The supplied example passes 5.0, 10000 and 20000 and states an expected output of 3.333 V; compare your choices with the quiz feedback.
Explain The answer computes 5.0 × 20000 / (10000 + 20000), then returns the result rounded to 3 decimal places.

Technical boundaries. The question assumes an unloaded two-resistor divider. It checks the supplied code choices against fixed answers rather than measuring a circuit or modelling resistor tolerances.

Back to the chapter