Navigation · Capstone: The Shift · M10-L1 · Advanced
The Shift Simulator
06:55, Meridian General. The night shift hands Scout over with a list: six deliveries, two of them urgent, a battery at 40 per cent. Over the next two minutes of simulated time the east door will close on its timer, a visitor will step out of a niche into the corridor, and Scout will meet the new glass partition in the atrium that its laser cannot see.
You will write the four small functions a delivery robot needs on a shift: the route, the safe speed, what to do when blocked, and the order of the stops. The first three are tested one at a time. The last stage puts them together and runs the whole shift on timings you have not seen.
Your task
Lab complete: post-mortem
You have passed every stage. Now connect it back to the theory and move on:
Output
What Python can I use?
Plain Python with math and heapq. Your code runs in a background worker: an endless loop is stopped after a few seconds and the page stays usable. It runs in your browser and is never sent anywhere.