A train travels at a speed of 30 mi/hr and travels a distance of 240 miles. How long did it take the train to travel?