ROBOGAME good output but...

my code

This is my second attempt for ROBOGAME. The first attempt wasn’t successful even tho it has a good output when i try it on my pc. so out of frustation, I opened other people code to get a glimpse of the solution. when i see it, i found that his code is more simple.

so i retype it on python(it was originally cpp), but i get this ‘wrong answer’ thing.

can anyone help me on this?