Question: In a computer generated guessing game, the player should guess a number between 1 and 2 0 . The player has 5 guesses. The player
In a computer generated guessing game, the player should guess a number between and The player has guesses. The player wins if the difference between two or more guesses with the actual number is smaller than or equal to
Ex: The number to be guessed is The player's guesses are Since is larger than by and is smaller than by the player has won this set of the game.
Write a function called NumberGuess that takes the number to be guessed and a player's guess array, calculates if the winning criteria is met, and returns logical for if the player wins and logical if the player did not.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
