Action

ACTION

Continue a code

    No saved programs yet.

    Commands
    write(text)

    Print text to the output.

    write(Hello) → Hello
    newline()

    Move the output to the next line. Output stays on one line until you call this.

    write(Hello)
    newline()
    write(World) → Hello
        World
    add(a+b)

    Print the sum of two whole numbers.

    add(10+5) → 15
    minus(a-b)

    Print the difference.

    minus(10-4) → 6
    times(a*b)

    Print the product.

    times(6*7) → 42
    divide(a/b)

    Print the quotient (whole-number division). Dividing by zero shows an error.

    divide(20/4) → 5
    set(name=value)

    Store a variable for later use.

    set(user=Ben)
    get(name)

    Print the value of a stored variable.

    get(user) → Ben
    random(min,max)

    Print a random whole number between min and max (inclusive).

    random(1,6) → 4
    repeat(n)

    Run the next command n times.

    repeat(2)
    write(Hi) → Hi (twice)

    Rules: no spaces inside the brackets, and math uses whole numbers only. Output is printed on the same line — use newline() to start a new line. You don't need to type run() — the Run button does that for you.