When you put the cursor on terminal and press ctrl + C, you can see that your program enter a dead loop:
Traceback (most recent call last):
File "e:\KEI\python_scripts\demo.py", line 4, in <module>
while loop < 2:
^^^^^^^^
KeyboardInterrupt
So the correct loop body should be in your def MathOnYourOwn() and you need to add a Restriction for 'loop'