Can your team coach stop on the way to Limerick and still make throw-in?
Your team coach has fifty minutes to get to a match in Limerick. There's talk of a stop on the way. How long could you stop for and still arrive by throw-in?
You can split the journey into time moving and time stopped. Divide the distance in metres by the average speed while moving to get driving time in seconds. Divide by sixty to convert to minutes, then add the stop time in minutes.
The coach covers forty-two thousand metres at an average of twenty metres per second while moving. Divide the distance by the speed to get two thousand one hundred seconds. Divide by sixty to get thirty-five minutes. Add an eight-minute stop and you get forty-three minutes altogether.
On another route, the coach covers thirty-six thousand metres at an average of twenty metres per second while moving and stops for six minutes. What total journey time does the model predict? Pick an answer.
Let s be the stop time in minutes. You can stop for zero minutes or more. With thirty-five minutes of driving, thirty-five plus s must be at most fifty. Arriving by throw-in means you can be early or exactly on time.
Start with thirty-five plus s at most fifty. Subtract thirty-five from both sides. Since the stop time cannot be negative, it can range from zero to fifteen minutes. Substitute fifteen into the total: thirty-five plus fifteen is fifty minutes. Any longer stop would make you late.
For a different match, the drive itself takes forty-eight minutes. You have sixty minutes from departure to throw-in. What's the longest stop you can take and still arrive on time? Pick an answer.
Suppose the Limerick coach now has thirty-two minutes. Subtract the thirty-five minutes of driving and the allowance is minus three minutes. You might read that as a negative wait, which is impossible. Even with no stop, you would be three minutes late. No stop time meets the deadline.
Enter the distance, moving speed, trial stop and time available. Python calculates the driving time in minutes and adds the trial stop, giving forty-three minutes. It subtracts driving time from the time available. A negative result means no feasible stop. Otherwise, the program reports the maximum.