Skip to content

charlieba/Guess-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guess Number or Letter Package

Example Game of Object Oriented Programming in Python - Package that choose a number o letter random and you have to guess what is the correct number or letter.

Installation

  1. The unique requirement that you need to have is python 3 running in you device.
  2. This package is available via pip
    pip install GuessNumberLetter
    
    https://pypi.org/project/GuessNumberLetter/

Usage

The main objective of this project is create an example of Object Oriented Programming in python and the basic way to create a package in python. The project consists in two classes:

  1. Guess Number: Python random choose a number from 1 to 1000 and you have to guess what is the number, this class has the next methods.
    • guess: Receive a int parameter and this method will return a text if your number is below, high or is the correct number.
    • change_guess: Method that does not receive a parameter and the action is change the random number.
    • get_answer: Method that does not receive a parameter, this method return the correct number.
  2. Guess Letter: Python random choose a letter and you have to guess what is the correct letter, this class has the next methods.
    • guess: Receive a string character, for example "w" and this method will return a text if your letter is below, high or is the correct number.
    • change_guess: Method that does not receive a parameter and the action is change the random letter.
    • get_answer: Method that does not receive a parameter, this method return the correct letter.

Licensing

Anyone could add code and improve the project. This project is handle by the GNU GENERAL PUBLIC LICENSE.

About

Example of Object Orientede Programming in Python - Package that choose a number o letter random and you have to guess what is the correct number or letter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages