When shapes change color or size dynamically, global variables must be handled correctly. Forgetting to reference a shape variable accurately or misunderstanding how its properties shift during custom event loops is a frequent point of frustration. 3. The Visual-Logical Disconnect
Row 0: red, blue, red, blue Row 1: blue, red, blue, red Row 2: red, blue, red, blue
To pass the autograder for 6.3.5, you must understand:
CS1 (Python with CMU Graphics) Topic: 6.3 – while Loops & Animation Sub-topic: 6.3.5 – Checkpoint / Exercise: Using while for Controlled Animation
"Write a program where a blue circle moves right across the screen. It should stop when its center reaches x = 300 . Use a while loop inside onStep or a custom function. Ensure the loop doesn't freeze the program." 6.3.5 Cmu Cs Academy
Use proper indentation. Python relies heavily on whitespace, and a single misplaced tab can ruin your logic.
Before we dissect the specific exercise, let's establish the platform. is a free, online, project-based curriculum developed by Carnegie Mellon University. It uses a custom, simplified version of Python (built around the cmu_graphics library) to teach computer science fundamentals through visual, interactive graphics.
def onKeyPress(key): global moveLeft if key == 'left': moveLeft = True
Keep experimenting, keep debugging, and remember: even the best programmers at CMU once struggled with the exact same logic! Are you working on a within 6.3.5, or When shapes change color or size dynamically, global
Below is a draft and explanation of a common solution for this type of feature, where a shape (like a Triforce icon or a boat) must move until it hits a specific boundary. Exercise Goal
: Students learn about designing user interfaces and understanding how users interact with computers.
The exercise , often referred to within the curriculum as an app involving movement or the "DVD Screensaver" task, is a pivotal milestone for students learning to control graphics dynamically. What is CMU CS Academy Unit 6.3.5?
def onKeyPress(key): global circle if key == 'r': circle.fill = 'red' elif key == 'b': circle.fill = 'blue' elif key == 'g': circle.fill = 'green' The Visual-Logical Disconnect Row 0: red, blue, red,
: The emphasis on project-based learning ensures that students gain practical experience.
Your program looks correct initially, but turns into a messy blur after a few clicks.
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later.
coordinate grid. Ensure your loop limits match these dimensions.