Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Numbers/Guess The Number Game.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import random

secrect_number = random.randint(1,10)
guess_count = 0
guess_limit = 3
while guess_count < guess_limit :
guess = int(input("Enter Your Guess Number : "))
guess_count +=1
if guess == secrect_number:
print (" You Won The Game ")
break
else:
print(" Hey You Guess 3 Times.... ")
print(" Try Next Time... ")
45 changes: 45 additions & 0 deletions Numbers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Guess The Number

A simple command-line Python game where the computer selects a random number and the user tries to guess it.

## Description

In this game, the program generates a random number within a given range.
The user keeps guessing until the correct number is found.
After each guess, the program tells the user whether the guess is too high or too low.

This project is suitable for beginners to practice:
- Loops
- Conditionals
- User input
- Random number generation

## How to Run

1. Make sure you have Python installed (Python 3.x).
2. Open a terminal in this folder.
3. Run the program using:

bash
```
python guess_the_number.py
```

# Example :

text
```
Guess the number between 1 and 100:
Enter your guess: 50
Too high!
Enter your guess: 25
Too low!
Enter your guess: 37
Correct! You guessed it in 3 attempts.
```

# Author
ls_hari prasad