A trip is made of legs that are all the same distance, each driven at its own speed. Write average_speed(speeds): one speed for the whole trip.
You drive 60 km/h there and 30 km/h back, the same distance each way. Your function gets each leg’s speed and hands back one speed for the whole trip.
type a speed to try one
average_speed(speeds)| speeds | one per leg, in km/h; every leg is the same distance | e.g. [50, 50] |
| returns | one speed for the whole trip | |