COLLEGEBOARD MCQ PRACTICE

Cryptography: Private and public keys Searched up IPv6 vs IPv4 and how many addresses can exist within each system Purpose of machine learning

CORRECTIONS

Q9: Which of the following best describes one of the benefits of using an iterative process of program development?

WRONG: It allows programmers to implement algorithmic solutions to otherwise unsolvable problems CORRECT: It helps programmers identify errors as components are added to a working program.

I didn’t realize that the questions is refering to an iterative process, not an algorithm. Otherwise, I may have misclicked on this question

Q19: A library of e-books contains metadata for each book. The metadata are intended to help a search feature find books that users are interested in. Which of the following is LEAST likely to be contained in the metadata of each e-book?

WRONG: The date the e-book was first published RIGHT: An archive containing previous versions of the e-book

Thinking about it now, it makes sense that the people want the date of the book published, since like any piece of media (movie search), people may wnat to look for books in a certain year, rather than if there is previous versions of it, which is not as appealing to reader.

Q22: A student is creating a procedure to determine whether the weather for a particular month was considered very hot. The procedure takes as input a list containing daily high temperatures for a particular month. The procedure is intended to return true if the daily high temperature was at least 90 degrees for a majority of days in the month and return false otherwise.

Which of the following can be used to replace missing code so that the procedure works as intended?

WRONG: total > 0.5 * counter RIGHT: counter > 0.5 * total

I didn’t read the question through enough, as a result accidently switched the total and counter varaibles around and forgto the 0.5 represents the 50% majority that is needed for the program to return true.

Q24: For example, the string Open quotation, THIS_IS_THE_BEST_WISH can be encoded as %#_#%E_BEST_W#H

TH = % IS = #

Which of the following statements about byte pair encoding is true?

WRONG: Byte pair encoding is an example of a lossy transformation because some pairs of characters are replaced by a single character. CORRECT: Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.

Forgot how lossy and lossless transformation works and therefore mixed up the definitions. If any character replaces with subsitutute, then it is lossless.

Q30: The program below analyzes the data in the database and compares the number of viewers of science fiction videos to the number of viewers of videos of other genres. It uses the procedure Analysis (category), which returns the number of unique users who viewed videos of a given category in the past year. The Analysis procedure takes approximately 1 hour to return a result, regardless of the number of videos of the given genre. All other operations happen nearly instantaneously.

WRONG: 4 hours CORRECT: 5 hours

I didn’t see the sciFiFans analysis and I only looked in the list to count how many programs are executed. From now on, I should look at the questions carefully.

Q34: A researcher wrote a program to simulate the number of mice in an environment that contains predators. The program uses the following procedures.

Based on the code, which of the following assumptions is made in the simulation?

WRONG: The number of mice does not change from day to day. CORRECT: The number of predators does not change from day to day.

I missed the code numMice assigned to NextDayPopulation (numMice, numPredators). If I looked at the table, I would have spotted a discrepancy in that the predators variable was never updated.

Q39:Which of the following explains a benefit of using open standards and protocols for Internet communication?

CORRECT: Open standards and protocols allow different manufacturers and developers to build hardware and software that can communicate with hardware and software on the rest of the network. WRONG: Open standards and protocols prevent developers from releasing software that contains errors.

I was considering that open protocols allow users to check and make improvments to the code, but in this case, mistakes are impossible to avoid in any code

Q40: The table below shows two students’ scores on the midterm and final exams and the calculated total points each student earns. Which of the following could be determined from the data?

I. The average total points earned per student II. The average increase in total points per student as a result of the score replacement policy III. The proportion of students who improved their total points as a result of the score replacement policy

WRONG: I and II CORRECT: All of them

Only considered the scores on a case by case basis, forgetting that there is thousands of students to grade also for that grade bump.

Q41: Using the same table from earlier, Which of the following could be used in the procedure to calculate a student’s total points earned in the course and store the result in the variable adjustedTotal?

WRONG: adjustedTotal assigned Max (midterm, finalExam) CORRECT: adjustedTotal assigned Max (midterm, finalExam) + finalExam

At this time, I forgot what the Max function does, so I didn’t understand what were in the paremeters, and thus got it wrong.

Q42: Which of the following best describes the result of using 128-bit addresses instead of 32-bit addresses?

WRONG: 2^4 addresses available CORRECT: 2^96 addresses available

I searched up this question, and they onyl provided that IPv6 has 1028 times more addresses than IPv4, which didn’t match any of the answers, so I guessed the closest.

Q45: A NAND gate is a type of logic gate that produces an output of false only when both of its two inputs are true. Otherwise, the gate produces an output of true. Which of the following Boolean expressions correctly models a NAND gate with inputs P and Q ?

WRONG: (NOT P) and Q CORRECT: NOT (P and Q)

I think I misclicked, because I definelty selected the right answer for this problem. Oh well, I need to save these quizzes properly.

Q46: A student wants to create an algorithm that can determine, given any program and program input, whether or not the program will go into an infinite loop for that input.

The problem the student is attempting to solve is considered an undecidable problem. Which of the following is true?

WRONG: It is possible to create an algorithm, but it will take a long time to process. CORRECT: Not possible

Why is it not possible to create an algorithm to solve all problems? What makes an undecidable problem impossible to solve?

Q47: In public key cryptography, the sender uses the recipient’s public key to encrypt a message. Which of the following is needed to decrypt the message?

WRONG: The Sender’s private key RIGHT: The recipient’s private key

Read a diagram, which apprently I did not understand and got the answer wrong for this process.

Q49: The code segment below is intended to display all multiples of 5 between the values start and end, inclusive. For example, if start has the value 3 5 and end has the value 5 0, the code segment should display the values 35, 40, 45, and 50. Assume that start and end are multiples of 5 and that start is less than end.

WRONG: end-start + 6 CORRECT: ((end-start)/5) + 1

Should have wrote all of the processes on a paper to check every statement. Looking at it wasn’t enough to determine if it is good or not.

Q50: The procedure searches for a value in a list.

Which of the following are true statements about the procedure?

I. It implements a binary search.

II. It implements a linear search.

III. It only works as intended when list is sorted.

WRONG: II and III CORRECT: II only

I confused the sorting requirement with binary, which needs the list to be sorted before it can be executed.

Q58: Which of the following are true statements about how the Internet enables crowdsourcing?

I. The Internet can provide crowdsourcing participants access to useful tools, information, and professional knowledge.

II. The speed and reach of the Internet can lower geographic barriers, allowing individuals from different locations to contribute to projects.

III. Using the Internet to distribute solutions across many users allows all computational problems to be solved in reasonable time, even for very large input sizes.

WRONG: All CORRECT: I and II

Honestly, this requires background knowledge on the subject which I don’t possess and also the question does not recognize the truthfullness of each statement, such as that not all problems can be solved fast, which doesn’t make sense.