A car moves through 20 km with a speed of 40 km/hr and the next 20 km with a speed of 60 km/hr. Calculate its average speed.
A train travels the first 20 km of its journey at a speed of 60 km/hr and the next 40 km at a speed of 80 km/hr. Calculate the average speed of the train for the entire journey.