PYTHON TRINKET
Play Snake . Eat the food at the coordinate point, but don't eat yourself! In the game of Snake , the player uses the arrow keys to move a " snake " around the board. As the snake finds food, it eats the food, and thereby grows larger. The game ends when the snake either moves off the screen or moves into itself. WORLD RECORD : Medusa, a reticulated python, clocked in at 7.67 meters (25 feet, 2 inches) long in its official world record measurement, on October 12, 2011. Snake, classic arcade game. Exercises 1. How do you make the snake faster or slower? 2. How can you make the snake go around the edges? 3. How would you move the food? 4. Change the snake to respond to arrow keys. 1. SNAKE GAME PYTHON CODE from turtle import * from random import randrange from freegames import square,vector food=vector(0,0) snake=[vector(10,0)] aim=vector(0,-10) def change(x, y): aim.x=x aim.y=y def inside(head): #boundary return -200 < head.x < 190 ...