# 1. Constants
g = 9.8
# 2. Inputs
mass = 0.5 # kg
height = 10 # meters
# 3. Physics Logic (The Formula)
potential_energy = mass * g * height
# 4. Output
print(potential_energy)
Click the [] Play button to execute.
The Goal: See how the "System" reacts to change.
Run the script: Confirm the result is 49.0.
Change the Environment: Change g = 9.8 to g = 1.6 (Moon).
Change the Object: Change mass = 0.5 to mass = 2.5.
Re-run: Notice how the single output line updates based on your new architecture.
Computers are literal. If the label doesn't match the box, it fails.
Change the line: potential_energy = mass * g * height
To: potential_energy = weight * g * height
Run it.
Observation: You will see a NameError. Python is telling you: "I don't know what a 'weight' box is. I only know 'mass'."
Instead of writing code, you instruct the AI using physics parameters.
Prompt Template for Students:
"You are a physics assistant. Write a simple Python script to calculate the speed of a wave on a string.
Create a variable for
tension(set to 100).Create a variable for
linear_density(set to 0.01).Calculate
velocity(). Print the result with the unit 'm/s'."
Paste the AI code into a new Code Cell.
The Architect's Check: * Did the AI use the correct formula?
Modify: Change the tension variable to 200. Does the velocity increase as expected?
Rename: Click "Untitled.ipynb" Kinematics_Intro.
Share: Click the Share button (top right).
Permissions: Change to "Anyone with the link can view."
Student Action: Tell your students to go to File > Save a copy in Drive.
[ ] Can you create a Text Cell for instructions?
[ ] Can you run a Code Cell using the Play button?
[ ] Can you explain what the = sign does?
[ ] Can you identify a NameError?
[ ] Can you use an LLM to generate a specific formula?
Create a Colab notebook that calculates Ohm's Law (
| Criteria | Exceptional (5 pts) | Developing (3 pts) | Needs Work (1 pt) | |
|---|---|---|---|---|
| Notebook Structure | Clear headings and text explanations for every code block. | Headings present but sparse explanation. | Only code cells; no text context. | |
| Physics Accuracy | Correct formula ( |
Formula correct but units missing or labeled wrong. | Incorrect physics logic. | |
| Variable Naming | Descriptive names used (e.g., current, resistance). |
Generic names used (e.g., x, y). |
Unclear or confusing names. | |
| Code Execution | Script runs without errors on the first try. | Script runs after fixing minor syntax typos. | Script has fatal logic or NameErrors. |
current = 2.5 # Amperes resistance = 10.0 # Ohms
voltage = current * resistance
print("The Required Voltage is:", voltage, "Volts")