comp284guess my number program 1

Develop a program to execute a guessing game. The game rules/steps are as follow:

  1. The program will choose a random number between 0 and 100 (visit the random generator guide here)
  2. Prompt user to guess the number. Keep track of how many times user has guessed the number
  3. Receive user input and compare it with the guessed number.
  4. Provide on of the following messages to user:
    1. if their guess is off by 3 from the goal, message TOO HIGH or TOO LOW
    2. if their guess is off by less than 3 from the goal, message HIGH or LOW
    3. of their guess is correct, then message ” You successfully guessed the number after X tries” (X being the number of guesses.

    The code from the professor is down in the word doc

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.