Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!
The code gets stuck in the first function because you have a while True: loop in it that doesn’t break. Remove that while True: loop and shift your indentation back on the rest of that section of code.