Git Product home page Git Product logo

py-guessing-game's Introduction

๐ŸŽฒ Number Guessing Game

This is a Python script for a simple number guessing game. You guess a number between 1 and 10, and the computer tells you if your guess is too high, too low, or correct.

๐ŸŒŸ What I Learned

  • Loops (while loop): How to keep the game going until the right number is guessed.
  • Conditional Statements (if, elif, else): How to check if the guess is correct, too high, or too low.
  • Python's random Library: To make the game interesting by having the computer pick a random number every time.
  • Input and Output: Getting the player's guess and showing messages.

๐Ÿš€ How to Play

  1. Run the guess_the_number.py script in Python.
  2. The game will ask you to guess a number between 1 and 10.
  3. Type your guess and press Enter.
  4. The game tells you if your guess is right, too high, or too low. Keep guessing until you get it right.
  5. When you guess right, you can choose to play again or stop.

๐Ÿ” Known Issues

  • The game does not check if you put in something that's not a number. If you do, it might stop working.

๐Ÿ›ซ Try It Yourself

  1. Download the guess_the_number.py file.
  2. Open it in a Python program like IDLE.
  3. Run the script and start guessing!
  4. See how the game works and have fun.

py-guessing-game's People

Contributors

anurag87204 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.