Great Robot Race - Solution and infinite loop issue

Just finished the ‘Great Robot Race’ project.

One BIG annoyance about the project is that it comes with an infinite loop in the starter code. In order to test your code as you go along (using print() statements) you will want to comment out everything below the current activity in the script (in case you are a noobie like me, you can comment things out quickly by selecting the code to comment out and pressing ctrl + / this is very helpful when commenting out large chunks of code!)

Things proceeded fairly quickly once I got rid of the infinite loop and was able to test my code step by step. I thought that both this project and the Event Coordinator project had some built in headaches and poor explanation.

Here’s my tested/working solution:


Thank you for posting this. I had very little confidence on what I was writing and what was the outcome supposed to look like because it was hard to take in the whole game logic, how the moves were coded and so on.

At least now I have a reference point to knowing that I didn’t misunderstand something or that someone interpreted the tasks the same

1 Like

Ended up not looking for help, but the hints in the module, but I still appreciated this post (at least to notice the source of the infinite loop, where at first I wasn’t sure what I did to cause it).

The biggest challenge here really seems to be understanding what is asked, because there is plenty to take in, when you want to understand the logic of the code what already is written for you.

So you have to write very little, but it was hard to understand at first what is the data you are working with or the structure of it, had to go back to the every time a function was mentioned just to see, what it will do or return exactly. :skull:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.