New Python Program: Number Guessing Game

Đang mở
#5 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cli

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ả

good first issue hacktoberfest

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:

  1. Fork this repository.
  2. Create a new Python file for the Number Guessing Game: number_guessing_game.py.
  3. Write the Python program following the specified tasks and guidelines.
  4. Test the game thoroughly to ensure it functions correctly.
  5. Commit your changes: git commit -m "Add Number Guessing Game program"
  6. Push to your branch: git push origin add-number-guessing-game
  7. 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của KALIIOWORK/basic_python_programs

Tất cả issue của KALIIOWORK/basic_python_programs

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.