hands-on lab

Python: Simple Guessing Game

Difficulty: Beginner
Duration: Up to 45 minutes
Students: 380
Rating: 3.1/5
On average, students complete this lab in20m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Build your Python skills by creating a basic console-based guessing game.

Combine Python's language fundamentals to build a game that prompts players to guess a number between 1 and 20.

The code used in this lab demonstrates some of Python's fundamental language features.

Features such as:

  • Importing modules
  • Function definitions
  • Loops
  • Conditionals
  • Operators

Prerequisites:

  • Familiarity with the Python runtime
  • Familiarity with the Python language syntax
  • Familiarity with callables
  • Familiarity with modules
  • Familiarity with built-in callables such as: int, input, and print

Target Audience

  • Novice Python Developers

Updates

April 9th, 2025 - Reorganize lab step instructions for clarity

January 23rd, 2024 - Disable Python start page pop-up

April 19th, 2023 - Updated theia to enable autosave

Covered topics

Hands-on Lab UUID

Lab steps

Web IDE Review
Simple Guessing Game