0
Can anyone solve and explain the error in this code. Pls
3 Respostas
+ 1
Try to read the error messages carefully. They always indicate the line number where the code went wrong, and some clue about the reason.
One thing is that addch() expects integer coordinates and you pass them floats. One way to fix, is to use // division instead of just / so in lines 11, 12 and 19:
snk_x=sw//4
snk_y=sh//2
food=[sh//2,sw//2]
And an equal sign is missing in line 29:
new_head = [snake[0][0],snake[0] [1]]
0
Thank u
0
But it is returning error on line 27 :
returned err. something like this