Calibrate the power supply
Assignments and order
Calibrate the power supply
Goal
Change 2 into 18 in at most 4 instructions. Use only ADD 3, SUBTRACT 1 and MULTIPLY 2.
Preview board
Not runAdd instructions, then run your pseudocode.
Pseudocode
0 / 4 instructionsReady to run.
How it works
Assignments and order
Reason about how assignment order changes a value.
Key rule
A variable stores one value. Add, subtract and multiply replace that value in instruction order.
Worked example
Different example: value = 4; value = value + 2; value = value * 3 gives 18. Reversing these operations gives 14.
Win condition
Complete the pseudocode and concept check.
Show a hint
Work backward from 18. What value could be doubled to reach it?
Edit text
Enter one instruction per line. You can use the displayed pseudocode or commands from the reference.