steify avatar

Learning To Code #6 (Number Guessing Game)

steify

Published: 11 Apr 2021 › Updated: 11 Apr 2021Learning To Code #6 (Number Guessing Game)

Learning To Code #6 (Number Guessing Game)

Number guessing game. (Exercise for beginners).

  1. Ask the user for two numbers.
  2. Generate a random number between these two numbers.
  3. Let the game begin.
    You have to ask for a number, if it's the same as the random number, then it's game over and the user has won.
  4. To make it more interesting -
    If the user's input is bigger than the random number, print out "The random number is smaller".
    If the user's input is smaller than the random number, print out "The random number is bigger".

Here is an example of how it should work.
guess.png

As always, if you got any questions then feel free to hit me up!🤓
Peace!✌️

Leave Learning To Code #6 (Number Guessing Game) to:

Written by

Read more #coding posts


Best Posts From steify

We have not curated any of steify's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From steify