Beginner

“Guess the Number” Game in Python

Build your first interactive game! A fun project to practice everything you’ve learned.

  • 5.0/5.0
  • 1524 enrolled
  • Beginner
  • French
Course Description

Build your first interactive game! A fun project to practice everything you’ve learned.

Import random to generate a secret number

--


Store that number in a variable

--


Explain the game rules

--

Ask the user for a number (input)

--


Check if it’s too high or too low

--


Give a hint Premium

--

Repeat attempts with while

--


Exit the loop when won

--


Congratulate the player and show number of attempts Premium

--

Edson Bitjoka

Edson Bitjoka

Developer & Instructor

About the instructor

I turn programming concepts into fun games. My motto: learn by playing!

Student reviews
Chloé Petit
Chloé Petit

2 days ago

My little brother and I played for hours! I even added a hard mode myself.

Frequently asked questions

It’s a guided project, perfect for reinforcing your knowledge of conditions, loops, and functions.

Absolutely! You can export your code and even send them the .py file to play.
“Guess the Number” Game in Python
Online course: 25 € / hour
In-person course: 35 € / hour

This course includes

  • Chapters 6
  • Duration 4h
  • Level Beginner
  • Language French
  • Unlimited access Yes
  • Certificate Yes