More Reeborg! MORE REEBORG!

Overview
You'll learn to repeat instructions with loops and combine them with your own functions — first to tighten up an old solution, then to send Reeborg over a row of hurdles.
Builds on
Even More Reeborg!. Keep your saved programs from that lab.
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…
- Your Step 8 solution uses at least two loops and still completes the mission.
- Your
jump_hurdle()function clears one hurdle, and a loop calls it to clear them all. - You've saved a
.pyfile for both steps. - You've saved
library.pyif your program imports it.
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 9 — Loops
-
Work through this world, then save your program.
Sometimes we need to repeat instructions several times. Instead of writing out each repeated instruction like this:
…we can instead use a loop, like this.
repeatis a Reeborg extension, not standard Python:Your mission: update your solution from Step 8 to use at least two loops. You can use loops in your Python code and also in your library!
Step 10 — Hurdles
-
Work through this world, then save your program.
Your mission:
-
Create a new function named
jump_hurdle()that jumps a single hurdle. Here's some code to get started. -
Use a loop to call your
jump_hurdle()function repeatedly to jump all the hurdles.
-
Check Your Work
- Run Step 9 with different flower positions and check that it uses at least two loops. Run Step 10 and check that a loop calls
jump_hurdle(). SaveStep 9.py,Step 10.py, andlibrary.pyif either program imports it.
Turn It In
- Submit these Python source files:
-
Step 9.py -
Step 10.py -
library.py, if imported by your program
Include your library
Save the contents of the library tab separately from Python Code. When reopening your work in Reeborg, restore that code to the library tab before running a program that imports it.
How It's Graded
One score, from 0–4, covers your submitted Python source files.
| Score | Evidence |
|---|---|
| 4 Excellent | Both programs and any imported library are submitted. Step 9 uses at least two loops and completes the flower mission; Step 10 uses a loop to call jump_hurdle() and clears every hurdle. |
| 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.