Your result

kody
Join Kody

Charge the battery

Change activity
Assignments and order

Charge the battery

Goal

Turn 3 into 10 in 2 instructions. Choose the order carefully.

Preview board

Not run

Add instructions, then run your pseudocode.

Pseudocode

0 / 2 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

    Doubling after adding also doubles the added amount.

    Related modules
    Edit text

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

    Command reference

    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