Search Results

Search found 1 results on 1 pages for 'lazorde'.

Page 1/1 | 1 

  • How do I implement an higher lower game algorithm?

    - by lazorde
    The computer will guess a player’s number between 1 and 100. After each guess the human player should respond “higher”, “lower” or “correct”. Your program should be able to guess the player’s number in no more than 7 tries. Begin by explaining the game to the player, telling him/her to think of a number between 1 and 100. Make the computer do what you would normally do to guess a number in a certain range. Allow the user to respond with “higher”, “lower”, or “correct” after each computer guess. Output the number of tries it took the computer to guess the number. Make the game as user friendly as you can.

    Read the article

1