I don’t get where is the error. Help. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I don’t get where is the error. Help.

Click down 👇🏻 https://code.sololearn.com/cbWKQkckQIRX/?ref=app Thank you very much for your time and help😁😁😁.

24th Aug 2020, 9:25 AM
Neo
1 Answer
+ 4
Missing closing square bracket ,missing Indentations and a colon after while loop ,also curses doesn't have attribute intscr, new_head = [snake [0][0], snake[1][0]] if key == curses.KEY_DOWN: new_head [0] += 1 if key == curses.KEY_UP: new_head [0] -= 1 if key == curses.KEY_LEFT: new_head [1] -= 1 if key == curses.KEY_RIGHT: new_head [1] += 1 snake.insert (0, new_head) if snake [0] == food: food = None while food is None: nf = [ random.randint(1, sh-1), random.randint(1, sw-1) ]
24th Aug 2020, 9:30 AM
Abhay
Abhay - avatar