New Python Program: Number Guessing Game
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
Direzione di ricerca
Crea number_guessing_game.py come specificato nell’issue. Inizia esaminando i requisiti del gioco elencati ed esegui manualmente il programma con input corretti, troppo alti, troppo bassi e non validi. È completato quando il gioco seleziona un numero dall’intervallo indicato, limita i tentativi, fornisce un feedback chiaro e gestisce gli input non validi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello Python enthusiasts! Let's add some fun to our repository with a classic Number Guessing Game implemented in Python. This beginner-friendly task involves creating a Python program where the computer randomly selects a number, and the user has to guess it within a limited number of attempts. This game will demonstrate basic random number generation, input handling, and conditional statements.
Tasks:
- Generate a random number between a specified range (e.g., 1 to 100).
- Allow the user a limited number of attempts to guess the number correctly.
- Provide feedback to the user if their guess is too high, too low, or correct.
- Display a victory message if the user guesses the number within the allowed attempts.
- Implement error handling for invalid inputs.
Guidelines:
- Use Python 3.x for the program.
- Ensure the game provides clear instructions and feedback to the user.
- Include comments in your code to explain the logic and functionality.
- Test the game with various scenarios to ensure it works as expected.
Example:
Welcome to the Number Guessing Game!
I'm thinking of a number between 1 and 100.
You have 7 attempts to guess it.
Enter your guess: 50
Too high! You have 6 attempts left.
Enter your guess: 30
Too low! You have 5 attempts left.
Enter your guess: 40
Correct! Congratulations, you guessed the number in 3 attempts!
How to Contribute:
- Fork this repository.
- Create a new Python file for the Number Guessing Game:
number_guessing_game.py. - Write the Python program following the specified tasks and guidelines.
- Test the game thoroughly to ensure it functions correctly.
- Commit your changes:
git commit -m "Add Number Guessing Game program" - Push to your branch:
git push origin add-number-guessing-game - Open a pull request to this repository.
Your contribution will bring joy to users playing this classic game. Thank you for creating this entertaining Python program for our repository!
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KALIIOWORK/basic_python_programs
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
KALIIOWORK/basic_python_programs#10 · 1 commento ·
-
good first issue hacktoberfest
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
KALIIOWORK/basic_python_programs#8 · 2 commenti ·
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
KALIIOWORK/basic_python_programs#6 · 1 commento ·
-
good first issue hacktoberfest
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
KALIIOWORK/basic_python_programs#1 · 2 commenti ·
Tutte le issue di KALIIOWORK/basic_python_programs
Issue simili
-
🐛 Bug 🔔 Pending processing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
jumpserver/jumpserver#17584 ·
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
modelscope/DiffSynth-Studio#1702 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·