Avoid Obstacles Infinitely

In programming, an event is something which occurs outside of the program code that affects how the program runs. An event might be a button being pressed or information being relayed from a sensor. Many programming languages, including Python, allow programmers to create code which can respond to some set of events. This type of programming is called “event driven programming”.

[4, p. 71]

[Adapted from 4, pp. 71-72]

Challenge

In this example we get Edison to do a U-turn when an obstacle is detected. What else could you get Edison to do instead?