Lesson 1 of 15
Average Velocity
Velocity and Displacement
Displacement is the change in position: .
Average velocity is displacement divided by elapsed time:
Units: metres per second (m/s). Velocity can be negative — it just means motion in the negative direction.
Examples
| (m) | (m) | (s) | (m/s) |
|---|---|---|---|
| 0 | 10 | 2 | 5.0 |
| 100 | 50 | 5 | −10.0 |
| 0 | 100 | 4 | 25.0 |
Instantaneous vs Average
Average velocity is measured over a finite interval. As , it becomes the instantaneous velocity — the derivative . For constant velocity the two are identical.
Your Task
Implement velocity(x0, x1, dt) that returns average velocity in m/s.
TCC compiler loading...
Loading...
Click "Run" to execute your code.