During first half of a journey by a body it travel with a speed of 40km/hr and in the next half it travels with a speed of 20 km/hr .Calculate the average speed of the whole journey.​