New Python Program: Number Guessing Game
まだ誰も着手していません。
評価
調査の方向性
issue に記載されているとおりに number_guessing_game.py を作成します。まず、一覧にあるゲーム要件を確認し、正しい入力、大きすぎる入力、小さすぎる入力、無効な入力でプログラムを手動実行します。ゲームが指定された範囲から数値を選択し、試行回数を制限し、明確なフィードバックを提供し、無効な入力を処理できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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!
- 主要言語
- Python
- スター
- 0
- フォーク
- 9
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
KALIIOWORK/basic_python_programs のほかの issue
-
good first issue hacktoberfest
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
KALIIOWORK/basic_python_programs#10 · コメント 1 件 ·
-
good first issue hacktoberfest
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
KALIIOWORK/basic_python_programs#8 · コメント 2 件 ·
-
good first issue hacktoberfest
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
KALIIOWORK/basic_python_programs#6 · コメント 1 件 ·
-
good first issue hacktoberfest
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
KALIIOWORK/basic_python_programs#1 · コメント 2 件 ·
KALIIOWORK/basic_python_programs の issue をすべて見る
似ている issue
-
link-check link-check:sphinx-theme
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100