Skip to content

Meet Reeborg!

Reeborg, a friendly robot, waving hello.

Overview

You'll learn the Python basics for controlling Reeborg — moving, turning, picking things up, and keeping your code readable — by solving a series of short missions.

Before you start

Each mission below has its own button that loads the right world. Save your work after every world — you'll turn all of them in at the end. The world names (such as Step 4) are Reeborg's labels; the numbered instructions below are this lab's action steps.

You've got it when…

  • Reeborg completes every mission: returns home, clears the dandelions, walks around the lake, and cleans up the gravel path.
  • Your code uses comments and blank lines so it's easy to read.
  • You've saved a .py file for every step.

Collaboration & AI

Work: On your own. You can compare notes with a neighbor, but write your own commands.

AI — AIAS Level 1, No AI: Write and debug your own code without AI assistance. What the levels mean.


Step 0 — Meet Reeborg

  1. Work through this world, then save your program.

    Open Step 0

    We'll do this one together: playing and resetting Reeborg's world, adding a command, dealing with errors, using Reeborg's keyboard, and saving and loading your work.

Step 1 — Return Home

  1. Work through this world, then save your program.

    Open Step 1

    Your mission: give Reeborg the instructions to return home.

Step 2 — Take and Put

  1. Work through this world, then save your program.

    Open Step 2

    Use the take() function to pick an item up, and the put() function to set it down.

    Your mission: pick up the dandelions, put them in the garbage, and return home.

Step 3 — Turning

  1. Work through this world, then save your program.

    Open Step 3

    Use the turn_left() function to make Reeborg turn left.

    Your mission: make Reeborg walk around the lake.

Step 4 — Comments and Whitespace

  1. Work through this world, then save your program.

    Open Step 4

    Use comments to organize your code and make it easier to read. A comment is a note for humans that the computer ignores; it starts with the # symbol. Use whitespace — blank lines — the same way, to group your code into sections the computer also ignores.

    This formatting example assumes an open area and four objects to put down; it is not the Step 4 solution.

    # This is an example of
    # a simple program where Reeborg draws a square,
    # leaving an object behind at each corner.
    
    # draw the first side
    move()
    move()
    turn_left()
    put()
    
    # draw the second side
    move()
    move()
    turn_left()
    put()
    
    # draw the third side
    move()
    move()
    turn_left()
    put()
    
    # draw the fourth side
    move()
    move()
    turn_left()
    put()
    

    Use the pause() function to make Reeborg wait for you to click the play button.

    Your mission: make Reeborg walk down the gravel path, picking up dandelions as it finds them and dropping them in the garbage cans (the grey dandelion images). Have Reeborg pause() at each dandelion it picks. Use comments and whitespace to keep your solution readable.

Check Your Work

  1. Reset and run each mission. Confirm that Reeborg completes it, and save each program as Step 0.py through Step 4.py.

Turn It In

  1. Submit these Python source files:
  • Step 0.py
  • Step 1.py
  • Step 2.py
  • Step 3.py
  • Step 4.py

How It's Graded

One score, from 0–4, covers your submitted Python source files.

Score Evidence
4 Excellent All five files are submitted; all four independent missions work. Step 4 includes comments, blank lines, and a pause at each dandelion.
3 Above Average All required programs work and use the required constructs, with minor errors or omissions in code organization.
2 Average Some required work functions, but a mission, required construct, or source file is missing.
1 Below Average Programs are largely incomplete or nonfunctional.
0 Failing No submission or no evidence of the required work.

Credit: Adapted from Dan Schellenberg's Computer Science 20 textbook.