On September 30th, 2019, Ted-Ed in collaboration with Kozmonot Studio revealed a new series, focused on the world of coding with an interesting twist. The Prison Break: Think Like A Coder, Ep 1 place us and Ethic, our amnesic cartoonist protagonist, inside some kind of prison. While she is figuring out what is going on, a robotic friend called Hedge appears and explains the complot Ethic is immerse in. Also, they need to save the world.

Between us, the name choices for the protagonists are pretty clever but funny at the same time. I think this series is intended for a younger audience so I can pass that Ted-Ed.

The premise of the series is outstanding, we must solve some problems with the help of Hedge and programming. Hedge can’t take decisions unless it is coded as instruccions and that’s exactly why he went to save Ethic. The narrator explains the problem, the capabilities of Hedge and some instructions to follow ahead. It gives us time, a hint or two and at the end the answer. Everything beautifully animated.

The problem for the first episode was pretty simple but clever and I wanted to resolve it while watching the episode, so here I’m going to share my take on the problem, since in programming there could be a thousand ways to solve the same problem.

If you want to read how I coded on Python to resolve the problem this problem, you should click here.