Using functions in a challenge (Solve)


#1

Hello everyone,

I am new on that website and I am currently participating to a programmation challenge.

Though, I have some difficulties to write some functions in my code, I know I use the right syntax but when I try to launch the code, the following error happen : "at Answer.py. not in a function on line 55" (Python code).

Thus, is it possible to write functions in codinGame or do we have to write everything in the loop ?

Thank you very much and have a nice evening !


#2

It's possible but i suppose your code is wrong. Can you give your code ?


#3

I do not get this error if I place the function before the loop, only if I place it after. It is quite strange, if I place my function before the loop, I have this error : "at Answer.py. not in a function on line 89" but I do not have any line 89 in my code, it stops at the line 87.


#4

Actually, I solved the error, there was just a parenthesis missing sorry for bothering you and than you so much ! :grin: