Skip to content

Instantly share code, notes, and snippets.

@wofockham
Last active March 19, 2018 03:50
Show Gist options
  • Save wofockham/275f43b104c81c641849 to your computer and use it in GitHub Desktop.
Save wofockham/275f43b104c81c641849 to your computer and use it in GitHub Desktop.

Title: Guess The Number

Activity:

  • You are to generate a basic "guess my number" game. The computer will pick a random number between 0 and 10. The user will guess the number until they guess correctly.

Specification:

  • The user should be asked to guess a number
  • If the user's guess is correct, the user should see a congratulatory message
  • If the user's guess is not correct, the user should be asked to guess the number again.

Extensions:

  • Let the user choose the maximum value (so they can play a long game with a random value between 0 and 10000, for example).
  • Give feedback to the user: "Wrong, guess higher!" or "Wrong, guess lower!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment