Your result

kody
Join Kody

Calibrate the power supply

Change activity
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 run

Add instructions, then run your pseudocode.

Pseudocode

0 / 4 instructions

    Ready 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?

    Related modules
    Edit text

    Enter one instruction per line. You can use the displayed pseudocode or commands from the reference.

    Command reference

    Return to Tower level 2

    WELCOME TO KODY

    A little play. A lot of possibility.

    I’m Kody, your coding companion. Your adventure is ready. Let’s find our way around.

    Log in