exec('import time;import random;import pygame;pygame.init();gameDisplay = pygame.display.set_mode((800,800));gameDisplay.fill((160,160,160));kuyruk = [];uzunluk = 10\nfor i in range(uzunluk):\n\tkuyruk.append([10+i,10]);kafax=10;kafay=10;yon = "sag";applex = 50;appley = 50\nwhile True:\n\tgameDisplay.fill((160,160,160))\n\tfor i in pygame.event.get():\n\t\tif i.type == pygame.QUIT:\n\t\t\tpygame.display.quit()\n\t\t\tquit()\n\ttry:\n\t\tif i.dict["key"] == 1073741903:yon = "sag"\n\t\tif i.dict["key"] == 1073741906:yon = "yukarı"\n\t\tif i.dict["key"] == 1073741904:yon = "sol"\n\t\tif i.dict["key"] == 1073741905:yon = "asagı"\n\texcept:pass\n\tif yon == "sag":kafax+=10\n\tif yon == "asagı":kafay += 10\n\tif yon == "yukarı":kafay-=10\n\tif yon == "sol":kafax-=10\n\tif kafax == applex and kafay == appley:\n\t\tkuyruk.reverse();kuyruk.append([kuyruk[0][0]+1,kuyruk[1]]);kuyruk.reverse();applex = random.randint(0,80)*10;appley = random.randint(0,80)*10\n\tkuyruk.pop(0);kuyruk.append([kafax,kafay]);pygame.draw.rect(gameDisplay,(255,0,0),pygame.Rect(applex-5,appley-5,10,10))\n\tfor i in range(len(kuyruk)):\n\t\tx=kuyruk[i][0];y=kuyruk[i][1];pygame.draw.rect(gameDisplay,(0,0,0),pygame.Rect(x-5,y-5,10,10))\n\tpygame.display.update();time.sleep(0.1)')