Skip to content

albabalcells/Project-1-Guess-the-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Ironhack Logo

Guess the number

Alba Balcells

Data Analytics Barcelona, June 2020

Content

Project Description

This code runs a "Guess the number" game, in which the user has to guess a number randomly generated by the computer.

Rules

The user can choose between one of the default levels of difficulty (easy, medium, hard) or set up their own rules. Each level corresponds to a range of possible numbers and a maximum number of tries. The computer will pick a random number and the user will have to guess it. For every wrong guess, the code will display whether the guess is below or above the correct number. The game finishes when the user guesses the number or when they run out of tries.

Workflow

  • First, the code displays a welcome message with a brief introduction to the game.
  • Then the user is asked to choose the level of difficulty (easy, medium, hard) or to set up their own rules ("let me choose" option).
  • For each of the levels, the range of numbers and the maximum number of tries is set by default. For the "let me choose" option, the user is asked to input them instead.
  • The computer randomly picks a number within the range specified.
  • The user inputs their guess, and the code tells them whether they are correct or not. If they are not, the code informs whether their guess is above or below the correct number.
  • The game will go on until the user inputs the correct guess or the maximum number of tries is reached.
  • When one round is over, the user will choose whether to keep playing or to exit the game.

Note: a warning message will be displayed when the user's input is not expected (e.g. text instead of number)

Organization

Used Trello to keep track of all the taskes.

Inside the repository there is a folder named Guess the number. The folder contains two Jupyter Notebook files, one with only the code and another with detailed explanations.

Links

Include links to your repository, slides and kanban board. Feel free to include any other links associated with your project.

Repository
Slides
Trello

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors