New Python Program: Number Guessing Game

Aberta
#5 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
55/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
cli

Direção de pesquisa

Crie number_guessing_game.py conforme especificado na issue. Comece revisando os requisitos do jogo listados e execute o programa manualmente com entradas corretas, muito altas, muito baixas e inválidas. Está concluído quando o jogo seleciona um número do intervalo indicado, limita as tentativas, fornece feedback claro e lida com entradas inválidas.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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!

Linguagem predominante
Python
Estrelas
0
Forks
9
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de KALIIOWORK/basic_python_programs

Todas as issues de KALIIOWORK/basic_python_programs

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.