/Guess-Word-Game

Guess the Word Game in Python

Primary LanguagePythonMIT LicenseMIT

Guess the Word Game in Python

This Python program is a text-based "Guess the Word" game where the player needs to guess a secret word character by character within a limited number of turns. The objective is to guess the entire word before running out of turns.

How the Game Works

  1. A secret word is predefined in the code (in this case, the word is "car").
  2. The player is provided with a certain number of turns (calculated based on the length of the secret word plus 2).
  3. The player is presented with a series of underscores, representing the characters of the secret word yet to be guessed.
  4. The player is prompted to guess a letter.
  5. If the guessed letter is in the secret word, it is revealed in its correct position(s).
  6. The player continues guessing until they either successfully guess the entire word or run out of turns.

Usage

To play the game, simply run the Python script. Follow the on-screen instructions to guess the secret word one character at a time.

Features

  • A fixed secret word for each game session.
  • Limited turns to increase the challenge.
  • User-friendly interface with feedback on guessed letters and remaining turns.

How to Run

  1. Make sure you have Python installed on your system.
  2. Download the guess_the_word.py file.
  3. Open a terminal or command prompt.
  4. Navigate to the directory where guess_the_word.py is located.
  5. Run the game by executing the command: python guess_the_word.py.

Can you guess the word before you run out of turns?

For more Python projects and tutorials, visit my GitHub profile: https://github.com/nisal2002