A dog runs 35 m to catch a Frisbee in 4.5 s, turns quickly and trots 22 m back in 3.6 s, but then stops to guard the Frisbee.
a) What is the dog's average speed?
b) What is the dog's average velocity?
The dog does not return completely so $\Delta s = 35m - 22m = 13m$
The way the dog traveled is $s = 35 + 22 = 57$ m
The time to complete his track is $t = 4.5 + 3.6 = 8.1s$
import numpy as np
d_s = 13
s = 57
t = 8.1
v_v = d_s / t
v_s = s/t
print(f'a) The dog\'s average speed is: {v_s:.1f} m/s')
print(f'b) The dog\'average velocity is: {v_v:.1f} m/s')