← Course home Next: Python variables → Code clears when you leave
MISSION 05 · PYTHON BASICS

A Robot Learns Python

Use a few Python calls to deliver parcels. Predict first, then follow each line as the robot moves.

What’s saved: this level never saves your Python code. Code and prediction clear when you leave a route, reset, or reload. If you turn saving on, only which routes you finished and how much help you used is kept on this device. Test accounts also share it, and lesson timing, with the site’s maintainer.

◇ Your mastery goalPython robot calls

Complete all 3 required tasks with a correct prediction, an inspected trace and an explanation that shows the concept. At least 2 must be independent checks, without answer-level help.

✓ Qualifying tasks: 0 / 3◎ Independent checks: 0 / 2 required
PRACTICE ROUTE · 1 OF 3

Mailroom lane

0 / 3 checks

A parcel is waiting at the end of a straight mailroom lane. Guide the robot to it; the tiny parcel cart is ready for its dramatic finish.

Delivery mapColumns left to right · rows top to bottom

Robot starts at column 1, row 2, facing E. Parcel: column 4, row 2.

1
Predict before you runWhere will the robot finish, and which way will it face?
2
Write the callsUse one call per line. Comments start with #.

Calls you can use: move() turn_left() turn_right()

This checks real CPython syntax against a small allowed-call list, then simulates only the robot calls. Blank lines and comments are okay; variables, loops, imports, and arguments come later.

4
Explain one ideaWhy does the robot enter the parcel square after three move calls?
Choose the explanation that fits this route
Help for this routeHints build gradually. Example answers need a deliberate click.

Highest hint used on this route in this session: none

For Further Reading and Exploration

These are outside sites with their own rules. You will see a notice before you leave. Pick one, not all.

  • Automate the Boring Stuff with Python

    Free book to read online. It starts with Python basics and builds up. Running the code needs Python on a computer.

    • Hands-on
    • May need an install
    • Ask an adult
  • CS50's Introduction to Programming with Python

    Free Harvard course with videos and notes. It starts with functions and variables. It moves at college speed, so go slowly.

    • Hands-on
    • Advanced
    • May count visits
  • Raspberry Pi Foundation Projects

    Step-by-step Python projects you can follow at your own pace. Change one small part to see what happens. Some need hardware.

    • Hands-on
    • May count visits
  • MIT OpenCourseWare 6.100L

    Free college course notes and videos. It moves fast, so take one topic at a time. Look for the first lectures on running a first Python program.

    • Hands-on
    • Advanced
    • May count visits