Mission: write real Python to drive a rover across the surface, collect every rock, and reach the landing pad. The computer does exactly what you wrote — nothing else.
Click one to drop it straight into your program above.
This is real Python. Same words, same brackets, same indentation as the programs you write in class — it just drives a rover instead of printing text.
wall_ahead(), wall_left(), wall_right(), on_rock() and at_goal(). Later levels are unsolvable without them.def gives a name to a group of lines, and elif chains a second question onto an if. Both are ordinary Python and both turn up near the end.for or an if must be pushed in with four spaces. Get that wrong and Python stops — exactly as it does in your real programs.