Suppose you throw a baseball straight up so that it reaches a maximum height of 8.00 m and returns 2.55 s after you throw it.
a) What is the average speed for this motion of the ball?
b) What is the average velocity?
The average speed $v = \frac{Total Distance}{Total Time}$
The total Distance $s = 8m_{up} + 8m_{down} = 16m$
The average Velocity $\overline{v} = \frac{\bigtriangleup{s}(startposition - endposition}{Total Time}$
Startposition = 0m -and- Endposition = 0m -so- $\bigtriangleup{s}=0-0=0m$
Or Total Displacement 8m to go and 8m to return $\bigtriangleup{s}=8m+-8m=0m$
Total Time $t=2.55s$
import numpy as np
s = 16
d_s = 0
t = 2.55
v_speed = s / t
v_velocity = 0 / t
print(f'The speed is: {v_speed:.2f} m/s')
print(f'The velocity is: {v_velocity} m/s')