Skip to content

2020-Fall-Cohort/guessing-game-leviflint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guessing Game

Assignment

Try to complete all the iterations listed below. Don't worry if you get stuck on one of them, we will review them tomorrow.

For Tuesday, work on iterations 1-6.

For Wednesday work on the stretch task.

Objective

Create a command line based number guessing game, where users have to guess a number between 1 and 10. Build the application in a series of iterations, with each iteration being a functional (though incomplete) version of the final application.

Skills Required

  • Console I/O
  • Random number generation
  • IDE familiarity
  • Basic types
  • If statements
  • Equality operators
  • Loops

Iterations

Build the application in the following small iterations. It should function at completion of each iteration!

  1. When the user guesses 7, the game announces they have won. All other numbers lose.
  2. When the user guesses 0, the game provides instructions for the user.
  3. After guessing, the user can take one more guess (unless they won!)
  4. When the user guesses -1, the application should exit.
  5. The game should provide feedback that the secret number is > or < any incorrect guesses.
  6. The number should be random, instead of always 7.

Stretch task: Give the user 3 tries before announcing they have lost.

About

guessing-game-leviflint created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages