New Python Program: Number Guessing Game
还没有人认领这个 Issue。
评估
调研方向
按照 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 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
learningequality/ricecooker#747 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 76/100
run-llama/llama_index#23199 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
KhronosGroup/glTF-Blender-IO#2769 ·