0

Please guys solve the erorr

import random import curses s = curses.intscr( ) curses.curs_set(0) sh, sw = s.getmaxyx( ) w == curses.newwin(sh, sw, 0, 0) w.keypad(1) w.timeout(100) snk_x = sw/4 snk_y = sw/2 snake = [ [snk_y, snk_x ] [snk_y , snk_x -1], [snk_y , snk_x -2] ] food = [sh/2 , sw/2] w.addch (food[0], food[1], curses.ACS_PI) key = curses.KEY_RIGHT While True : next_key = w.getch( ) key = key if next_key == -1 else next_key if snake[0][0] in [0, sh] or snake[0][1] in[0, sw] or snake[0] in snake[1:] : curses.edwin( ) quit( ) new_head = [snake[0][0], snake[0][1]] if key == curses.KEY_DOWN : new_head [0] += 1 if key == curses.KEY_UP : new_head [0] -= 1 if key == curses

31st May 2020, 4:55 PM
Roshan Malhotra
Roshan Malhotra - avatar
2 ответов
+ 1
Post ur code bit sorry We cant help u with this mass text so plzzx
31st May 2020, 4:57 PM
Abhay
Abhay - avatar
+ 1
This code is full of errors. debug it. Syntax error, indentation error and don't follow case sensitive rules of python.
31st May 2020, 5:01 PM
Maninder $ingh
Maninder $ingh - avatar