Practice question · Multiple choice
Your projectile simulation says a thrown ball climbs forever. Which debugging move gives the most information first?
Hints
- Debugging is hypothesis testing: which action lets you observe the failing quantity directly?
- If gravity were truly being applied, the printed velocity would decrease each step. Does it?
Show the answer
C. Print the velocity each timestep and watch the sign
Why
Making the invisible visible beats guessing: the velocity trace immediately shows whether gravity’s sign, the update order, or the integration is at fault. Rerunning changes nothing, rewriting risks new bugs, and smaller timesteps only mask logic errors.
Practise Debugging and validation
The app has 9 more questions on this lesson, and keeps your place in the course. Physics I is free to start.