Paste the AI's code into a new cell.
Identify the Physics: Find where the AI defined acceleration (
The "Moon Test": Change
Pedagogical Question: How would you explain the difference between a straight line (Week 1) and this curve (Week 2) to a 10th-grade student using this code?
"The Library is Missing": If you forget import matplotlib.pyplot as plt, the computer won't know how to draw.
"Dimensional Mismatch": Having 5 time points but 6 position points.
"String vs. Number": Putting quotes around your data: [ "0", "1", "2" ]. This makes them labels, not numbers you can calculate.
Task: Create a Google Colab notebook that plots Velocity vs. Time for a falling object.
Constants: Define
Formula:
The Plot: Make the line Green, add a Grid, and ensure the labels include (m/s) and (s).
Share: Submit your link!
We will move from plotting "perfect formulas" to simulating "Real Physics" where forces change every second!
"Last week, we looked at Python as a high-powered calculator. Today, we’re moving from 'the answer' to 'the story.' In physics, a graph tells the story of motion. We are going to learn how to tell that story using a library called Matplotlib."
Think of a ticker-tape timer or a motion sensor. It doesn't give you one number; it gives you a sequence. In Python, we store that sequence in a 'List,' which is just a set of brackets. Notice that the time list and the position list are like two sides of a data table. If you have 5 seconds of data, you must have 5 position measurements. If they don't match, the 'system' crashes because the computer doesn't know where to plot that extra point.
Look at the first line: `import matplotlib.pyplot as plt`. Think of this as opening your lab drawer and taking out the graphing paper and ruler. We give it the nickname `plt` to save time. Notice the commands below it: `plt.title`, `plt.xlabel`. These aren't for the computer—they are for the **human reader**. As teachers, this is where we ensure our students are using proper units like 'meters' or 'seconds'."
"Now, I want you to get your hands dirty. Go to your Colab notebook and run the starter code. Once you see the graph, I want you to change the `marker` from a circle to an 'x'. Why? Because in a real lab, data points are often discrete 'marks' rather than a smooth connected line. This is a pedagogical choice you make as a teacher."
"We’re going to ask the AI to write a script for constant acceleration. But remember: you are the **Architect**. The AI might give you the code, but it doesn't know if the graph _looks_ right for a physics classroom. You need to check if it used $1/2 \cdot a \cdot t^2$ or if it hallucinated a different formula. Use the prompt on the screen and see what it builds for you."
"This is the most important part of today. Once you have your acceleration graph, change the gravity variable to $1.6$. In a textbook, a student just sees a different number. In Python, the student sees the entire curve flatten in real-time. This 'visual feedback' is what helps students develop an intuitive sense of how gravity affects motion."
"When your students try this, they will hit errors. The most common one is the 'Dimensional Mismatch.' It's the computer's way of saying 'I have a time for this dot, but no position.' Remind them to count their data points. Also, watch out for 'Quotes.' If you put quotes around a number, Python thinks it's a word and refuses to graph it."