"Your code took too long to execute." Why? | DataCamp

"Your code took too long to execute." Why?

The first thing to check is if you have a runaway loop. This error can be caused by a for-loop or a while-loop that never ends. Check the hint or solution to see if this is the case.

If the viewing the solution didn't resolve the problem, please email us at support@datacamp.com with the URL of the exercise and the code you tried and we'll get back to you as fast as we can.