New Python Program: Number Guessing Game
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Tạo number_guessing_game.py theo như được chỉ định trong issue. Bắt đầu bằng cách xem lại các yêu cầu trò chơi được liệt kê và chạy chương trình theo cách thủ công với các đầu vào đúng, quá cao, quá thấp và không hợp lệ. Công việc hoàn tất khi trò chơi chọn một số trong phạm vi đã nêu, giới hạn số lần thử, đưa ra phản hồi rõ ràng và xử lý đầu vào không hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của KALIIOWORK/basic_python_programs
-
good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
KALIIOWORK/basic_python_programs#10 · 1 bình luận ·
-
good first issue hacktoberfest
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
KALIIOWORK/basic_python_programs#8 · 2 bình luận ·
-
good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
KALIIOWORK/basic_python_programs#6 · 1 bình luận ·
-
good first issue hacktoberfest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
KALIIOWORK/basic_python_programs#1 · 2 bình luận ·
Tất cả issue của KALIIOWORK/basic_python_programs
Issue tương tự
-
🐛 Bug 🔔 Pending processing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
jumpserver/jumpserver#17584 ·
-
link-check link-check:sphinx-theme
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
OpenHands/extensions#626 · 1 bình luận ·
-
Change observation tooltip text Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
CSCfi/sd-search-api#39 ·