6.3.5 Cmu Cs Academy May 2026
Q: Do I have to use nested loops? Can I manually build the grid?
A: The auto-grader expects nested loops. Manual lists won’t pass because the test cases call the function with arbitrary row/column arguments.
Q: My function works but the visual output is wrong. Why?
A: Double-check the drawing part. It might be using the wrong coordinates or cell dimensions.
Q: What if the prompt asks for in-place modification instead of returning a new grid?
A: Then you should not create a new grid. Use nested loops to set grid[r][c] = new_value directly. 6.3.5 Cmu Cs Academy
Q: Is 6.3.5 harder than 6.3.4?
A: It builds directly on 6.3.4. If you struggled there, review traversing a 2D list before attempting 6.3.5.
Before data can be plotted, it often needs to be organized. Exercise 6.3.5 often requires: Q: Do I have to use nested loops
def onKeyPress(key):
global circle
if key == 'r':
circle.fill = 'red'
elif key == 'b':
circle.fill = 'blue'
elif key == 'g':
circle.fill = 'green'
Cause: You put the movement code inside onKeyPress instead of onStep.
Fix: onKeyPress should only toggle a variable (app.moving = True). The actual coordinate change (shape.centerX += 5) must go inside onStep.
Unit 6.3.5 is often considered one of the most "practical" units in the introductory curriculum. It simulates a real-world data science workflow: Cause: You put the movement code inside onKeyPress
By mastering this unit, students gain the ability to analyze trends, identify outliers, and present arguments supported by visual evidence. It moves beyond the syntax of Python into the realm of computational thinking.
In previous units, you used app.step() to make things happen automatically. In Unit 6.3, you switch to Event-Driven programming. The code only runs when the user presses a key.
To excel at checkpoints like 6.3.5, follow these strategies: