Your code and the supplied support

File map

FileWhat it containsShould I edit it?
student.pyExactly the text in your selected lesson editor when you exported. Blank lines, unfinished steps and mistakes are preserved.Yes: this is your program.
run.pyStarts your file, supplies the compatibility imports, opens the event loop, and reloads your saved file on Restart.Optional later learning.
camp_turtle.pyA readable, standard-library-only desktop support library using real Tk Turtle drawing.Optional later learning.
project.jsonLesson identity, title, runtime details and the portal input values available at export. No answer or corrected program is stored here.Usually no.
README.mdHow to open and run the project.Reference.
WHAT_WAS_ADDED.mdThis explanation of the additions and their limits.Reference.

No gameplay solution is added to student.py. The launcher reads its exact bytes and compiles them under its real filename. Your shapes, movement, collision checks, score changes and win/loss decisions still come from your file. A download of lesson code alone contains only that file; it does not include these runtime services.

Why the helper is needed

The portal executes real Python, but its Turtle library is a classroom browser implementation. Standard desktop Turtle does not provide the portal's finish(), show_score(), show_time(), elapsed(), basket shape or camp.Game. A plain desktop event loop also needs to be started.

The launcher loads standard Python Turtle first, then temporarily makes import turtle in your program refer to the explicit camp_turtle.py compatibility module for this run. It also supplies an in-memory camp module for optional challenges. It does not install or overwrite Python libraries, create a file named turtle.py, change your Python settings, or rewrite your program. When this process ends, the temporary bindings are gone.

Most drawing, movement, coordinates, colors and shapes are delegated to real Tk Turtle. The helper adds:

- An appropriately sized drawing window, immediate frame drawing, and the desktop event loop. A mainloop()/done() line in the student file is accepted; the launcher owns the actual loop after setup.

- The classroom basket shape, registered as a polygon through Turtle.

- Guarded timers and input callbacks, plus host Pause/Resume, Restart and Close controls.

- finish(message, won=...) to stop callbacks and pending timers, ignore further game input, show the result and immediately leave the current callback. It is not just a printed label.

- Display-only show_score(number) and show_time(seconds). Only the student's code changes those displayed values.

- elapsed(): active seconds from the start of gameplay, excluding setup and pauses, frozen after a result/error. A pause preserves the remaining delay of pending timers.

- camp.Game for the optional existing timed/lives challenges. The student code still chooses when to finish. A countdown or zero lives does not automatically end the game.

- The current Day 1 browser pen defaults (teal, width 3) for module-level drawing, and ordinary terminal input/print.

Learning and behavior differences

You can read run.py and camp_turtle.py later to learn about modules, event loops and libraries. You do not have to learn the helper implementation before working on the lesson. These files are supplied support, and their extra APIs should not be mistaken for standard Turtle.

- Desktop graphics use Tk, so fonts, shape outlines, window decoration and exact frame timing can look different from the browser canvas. Keyboard repetition follows your operating system rather than the browser's fixed repetition rate.

- The desktop clock uses monotonic active real time. It is paused explicitly with the controls. The browser has its own simulated foreground clock and replay seed; this export does not promise pixel-identical animation, exact timing, or identical random outcomes on restart.

- Gameplay starts after your setup code; there is no separate browser Start/Reset workflow. Restart reloads the file saved on disk, with a fresh Python namespace and a fresh game clock. Randomness uses normal Python behavior unless your code sets a seed.

- Portal queued input is not replayed. Standard input() asks in the terminal. A browser's robot speech/placeholder scene is not added to a print-only lesson.

- This is a local Python program, not the portal's bounded worker. Imports, files and loops have normal desktop Python capabilities; no browser execution limits or sandbox are reproduced. Closing/pause controls cannot interrupt an infinite Python loop that prevents Tk from processing events; use Ctrl+C in the terminal.

- This compatibility layer targets the current Day 1 and Day 2 lesson subset. It is not a complete emulation of every Turtle feature or older game engine. The launcher rejects metadata for other lesson runtimes.

Verification status

The support has source and display-free behavioral tests. A real Tk display is not available in the build environment, so graphical desktop behavior has not been certified here. Before classroom-wide home use, test the extracted project on the intended Windows/macOS/Linux desktop Python installation. Check launch, keyboard focus, Pause/Resume, results, error messages, Restart and closing the window.

Official references: https://docs.python.org/3/library/turtle.html and https://docs.python.org/3/library/tkinter.html