Charge the battery
Assignments and order
Charge the battery
Goal
Turn 3 into 10 in 2 instructions. Choose the order carefully.
Preview board
Not runAdd instructions, then run your pseudocode.
Pseudocode
0 / 2 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
Doubling after adding also doubles the added amount.
Edit text
Enter one instruction per line. You can use the displayed pseudocode or commands from the reference.