CodePlay ?

CodePlay

Learn

Going in order helps, but nothing is locked.

  1. 1 · repetition

    Loop Rover

    A rover follows your Python commands: move(), turn_left() and turn_right(). Typing move() ten times works, but a for loop says it once. In this unit you read loops, fix them and write your own, first with the rover and then without it.

    0 / 7 done

  2. 2 · decisions

    Sensor Rover

    Programs can decide. A comparison like score >= 5 is either True or False, and if runs a block only when it is True. The rover now has two sensors, front_is_clear() and at_flag(), so one program can handle grids it has never seen.

    0 / 7 done

  3. 3 · collections

    Lists & Words

    A list keeps many values in order, a string is a list of characters, and a dict looks values up by name. The same for loop works on all of them: for item in my_list visits each item in turn.

    0 / 7 done

  4. 4 · functions

    Function Forge

    A function is a named piece of code you can use again. Parameters are its inputs and return hands back its answer. Good names turn a long program into a few readable steps.

    0 / 7 done