Coding Task: 01.04 Snake (Extension)

Snake was a popular game on mobile phones in the days before smartphones. In the game, you’re a snake that grows each time it eats food. The goal is to increase your score by eating food, without eating yourself! Start by playing the game!

Controls

  • Move around with the WASD keys on your keyboard.
  • Steer the snake (πŸ˜€πŸ“€πŸ“€) towards the food (πŸ“) to eat it and grow longer!
  • The game will end if the snake eats itself. Don’t move too quickly!

Your Task

Once you’ve finished playing, you can start editing the code! In the editor below, look through the existing code and see if you can make the changes listed in the requirements section below. Don’t worry if you break the code! Just click the reset button to start again.

Requirements

  • The program should run without any errors.
  • Change the text at the top from === SNAKE === to something else.
  • Change the symbols that make up the snake (πŸ“€ and πŸ˜€ by default) to something else.
  • Change the symbol for the fruit (πŸ“ by default) to something else.
  • Change the score you get for eating the fruit (100 by default).

Example

Below is an example of how the program should run:

Scroll to Top