Code Challenge
Code Challenge
Technical boundaries. This exercise assumes the shown cross-wiring rule and checks fixed answer choices. It does not run a vehicle simulation or scale ADC readings to a PWM duty range.
Code Challenge
Treat the missing lines as a signal-path test, not a syntax puzzle. The first blank must create a PWM output for the left motor; an ADC or input constructor would put that pin on the sensing side of the system. For the second blank, keep the cross-coupling explicit: the value named left came from left_sensor, so writing it to right_motor makes the vehicle turn toward the brighter side rather than merely changing both motors together. After filling both gaps, trace the complementary final line—left_motor.duty(right)—to confirm that each sensor controls the opposite wheel. The challenge therefore checks the mechanism behind Vehicle 2b attraction and reconnects the code to the emergent-behaviour discussion, where a simple wiring rule produces the motion without a stored path plan.