Программа на языке python. Код Python, чтобы организовать эстафете.
In a 4 × 100 meters relay event, each team consists of four runners. Each runner in a team completes 100 meters. A relay baton(a stick) is carried by each runner, after completing 100 meters, it is passed to the team member continuing the next leg. Assuming that each runner runs at a constant speed (the average speed of the runner), and all the first leg runners (of each team) start at the same time. Create a thread class 'RelayRunner' that simulates the behaviour of a runner. A runner must announce his/her name, the starting time of his leg, and the time at which he/she is handing over the relay baton to the next leg runner. Write a class 'RelayTeam' (which includes 4 runners) to model the behaviour of a team participating in the 4 × 100 meters relay event. Create three teams participating in the 4 × 100 meters relay and conduct the race. Print the winning team name once the race is complete.
Что я уже пробовал:
Не очень хорошо пробовал, но есть небольшая идея о том, как это сделать. В настоящее время в спешке, чтобы получить решение.