New Python Program: Number Guessing Game
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
Erstelle number_guessing_game.py wie im Issue angegeben. Beginne damit, die aufgeführten Spielanforderungen zu überprüfen, und führe das Programm manuell mit korrekten, zu hohen, zu niedrigen und ungültigen Eingaben aus. Es ist fertig, wenn das Spiel eine Zahl aus dem angegebenen Bereich auswählt, die Anzahl der Versuche begrenzt, klares Feedback gibt und ungültige Eingaben verarbeitet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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!
- Vorherrschende Sprache
- Python
- Sterne
- 0
- Forks
- 9
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus KALIIOWORK/basic_python_programs
-
good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
KALIIOWORK/basic_python_programs#10 · 1 Kommentar ·
-
good first issue hacktoberfest
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
KALIIOWORK/basic_python_programs#8 · 2 Kommentare ·
-
good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 50/100
KALIIOWORK/basic_python_programs#6 · 1 Kommentar ·
-
good first issue hacktoberfest
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 48/100
KALIIOWORK/basic_python_programs#1 · 2 Kommentare ·
Alle Issues in KALIIOWORK/basic_python_programs
Ähnliche Issues
-
Add: hunch Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DiamondLightSource/dodal#2211 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
openml/openml-python#1749 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
sipyourdrink-ltd/bernstein#6191 ·