Question: Write another function that takes two parameters: a user's guess and the current 'secret' guess. if the user's guess is exactly the same as the

Write another function that takes two parameters: a user's guess and the current 'secret' guess.
if the user's guess is exactly the same as the computer guess return 10(the user gets 10 points for an exact guess).
Otherwise if the guess is within 5 points of the secret guess, then return 5(the user gets 5 points for an approximate guess).
Otherwise return 0.
Call this function CheckGuess

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!