AP CSP Practice Test – Unit 10 Review Questions

Access More Questions
Questions refer to the Hi-Lo game described below. Consider the problem of writing a Hi-Lo game in which a user thinks of an integer from 1 to 100 inclusive and the computer tries to guess that number. Each time the computer makes a guess, the user makes one of three responses: “lower” (i.e., the number is lower than the computer’s guess) “higher” (i.e., the number is higher than the computer’s guess) “you got it in < however many > tries! ” Suppose the game is programmed so that the computer uses a binary search strat- egy for making its guesses. What is the maximum number of guesses the com- puter could make before guessing the user’s number?
Correct Answer:
7
Explanation:
Correct answer: 7

Access more questions from this quiz

Continue to AP CSP Practice Test – Unit 10 Review Questions for more practice questions and the full quiz experience.

Access More Questions