Guess The Number


You’re going to learn programming by building a game with a language called Python.

Did you know?
Websites like YouTube and Instagram are built using Python.

What you will make

You will make a guessing game in which the computer picks a number between 1 and 9, and the player has five chances to guess the number.

What you will learn

  • Printing text to the screen
  • Basic string concatenation (including using str() to convert numbers)
  • Storing text and numbers in variables
  • Getting user input (including int() to convert numbers)
  • Simple maths operations
  • If/elif/else statements and comparison operators
  • While loops

What you will need


An internet-connected computer


This project uses Python 3. We recommend using Trinket, which allows you to write Python code online.