Number Guessing Game GUI

Description

This is a Number Guessing Game GUI built with Python's tkinter library. The game generates a random number between 1 and 100, and the player has to guess the number within a limited number of attempts based on the chosen difficulty level.

Difficulty Levels

  • Easy: 10 attempts
  • Hard: 5 attempts

Features

  • A graphical user interface (GUI) for the Number Guessing Game.
  • The player can choose between easy and hard difficulty levels.
  • The game provides feedback to the player after each guess, indicating whether the guess is too high or too low.
  • The game displays the number of attempts remaining.
  • When the player correctly guesses the number or runs out of attempts, appropriate messages are displayed.
  • The player can restart the game and choose a different difficulty level.

Requirements

  • Python 3.x
  • tkinter (comes with Python by default)
  • random (comes with Python by default)

How to Play

  1. Run the game by executing the NumberGuessingGameGUI.py script.
  2. The GUI window will open with the game interface.
  3. Choose the difficulty level (easy or hard) by selecting the corresponding radio button.
  4. Click the "Start" button to start the game.
  5. Enter your guess in the text field and click the "Guess" button.
  6. After each guess, the game will provide feedback on whether the guess is too high or too low.
  7. Keep guessing until you correctly guess the number or run out of attempts.
  8. If you correctly guess the number, a congratulatory message will be displayed.
  9. If you run out of attempts, the correct number will be revealed, and a message indicating that you've lost will be displayed.
  10. You can start a new game by clicking the "Start" button again.

Attribution

  • The ASCII art logo is generated using the art library.
  • Created by Deric C. San Andres