Skip to content

anshul099/25bcs029-PythonPursuers-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Number Guessing Game (Python)

Description

This is a simple Python number guessing game where the computer randomly selects a number between 1 and 10, and the player has 3 valid attempts to guess it correctly.


How the Game Works

  1. The computer randomly generates a number between 1 and 10.

  2. The player is prompted to guess the number.

  3. The player has 3 valid guesses:

    • Invalid inputs (non-integers or numbers outside the range) do not count as attempts.
  4. If the player guesses correctly, the game ends with a success message.

  5. If all attempts are used, the correct number is revealed.

  6. The player is then asked whether they want to play again.


Sample Output

The Computer has chosen a random number between 1 and 10!
You have 3 tries!! Guess the number~
Enter your guess: 5
Wrong guess, 1 try used.
Try Again..
Enter your guess: 7
You guessed Correct!!
Do you want to play again? (y/n):

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages