Review of the Test

  • Many technical questions
  • Many knowledge questions about topics relating to computing
  • Questions on social and ethical questions about computing and the roles of different technological components of computing

    Areas for Future Improvement

  • Study previous collegeboard practice quizzes to refresh general knowledge
  • Research more terms and vocab words that are confusing or new

    Corrections

    Score: 53//67

Q4: In a certain computer program, two positive integers are added together, resulting in an overflow error. Which of the following best explains why the error occurs?

My Answer: A; The program attempted to perform an operation that is considered an undecidable problem.

Correction: B; The error occurs because there are a fixed number of bits that are used to represent the integers in the program, but the sum tha results from the program is greater than the maximum representable value

Q9: An Internet user has a need to send private data to another user. Which of the following provides the most security when transmitting private data?

My Answer: B; Sending the data using a high-bandwidth connection

Correcion: C; Sending data with public-key allows for only the private key to decrypt the encryption made by the public key

Q10:Ticket prices for a science museum are shown in the following table.

Type of Ticket General Admission Cost (in dollars) Guided Tour Cost (in dollars)
Regular (ages 13 and up) 8 10
Child (ages 12 and below) 6 8

A programmer is creating an algorithm to display the cost of a ticket based on the information in the table. The programmer uses the integer variable age for the age of the ticket recipient. The Boolean variable includesTour is true when the ticket is for a guided tour and is false when the ticket is for general admission.

Which of the following code segments correctly displays the cost of a ticket?

My Answer: C; cost <– 6 IF (age > 12) { IF (includesTour) { cost <– cost + 2 } } DISPLAY (cost)

Correction: B; cost <– 6 IF (age > 12) { cost <– cost + 2 } IF (includesTour) { cost <– cost + } DISPLAY (cost)

Q15: Which of the following best compares the values displayed by programs A and B?

My Answer: B; Program A and program B display the same values in different orders.

Correction: A; Program A displays the value before doing an operation while program B does the operation then displays it, but the same values are displayed so they display identical values in the same order.

Q16: While debugging the program, the student realizes that the loop never terminates. Which of the following changes can be made so that the program works as intended?

My Answer: B; Inserting index <– index + 1 between lines 7 and 8

Correction: D; Inserting index <– index - 1 between lines 7 and 8; this change allows for the loop to be terminated by subtracting one fromm the insert index so it’ll eventually be less than 1

Q22: Which of the following code segments can be used to simulate the behavior of the spinner?

My Answer: C; spin ← RANDOM(1, 8) IF spin = 1 DISPLAY “Move 1 space” ELSE IF spin = 2 DISPLAY “Move 2 spaces” ELSE DISPLAY “Lose a turn”

Copy code Correction: D; spin ← RANDOM(1, 8) IF spin = 1 DISPLAY “Lose a turn” ELSE IF spin = 2 DISPLAY “Move 2 spaces” ELSE DISPLAY “Move 1 space”

This corrected order makes it so the spinner accurately gives you the answer based on what it lands on.

Q26: A list of binary values (0 or 1) is used to represent a black-and-white image. Which of the following is LEAST likely to be stored as metadata associated with the image?

My Answer: A; Copyright information for the image

Correction: D; A duplicate copy of the data would least likely be metadata because it does not describe data about the image, it is a complete copy of it

Q27: Which of the following best explains why it is not possible to use computers to solve every problem?

My Answer: A; Current computer processing capabilities cannot improve significantly.

Correction: D; There exist some problems that cannot be solved using any algorithm, an example of this would be undecidable problems which can’t always be solved by ann algorithm

Q30: Which of the following is NOT a possible value displayed by the program?: IF n ≥ 0 n ← n + 1 ELSE n ← n * negative 1

IF n ≥ 1 IF n ≥ 30 DISPLAY “too high” ELSE IF n ≥ 10 DISPLAY “in range” ELSE DISPLAY “too low” ELSE DISPLAY “out of range”

My Answer: C; Too Low

Correction: D; Out of Range, this is because every other operation would have to be false in order to be outside of the range and every number under 0 would be multiplied by -1 to make it fit into the program.

Q34: Which of the following code segments will move the robot to the gray square along the path indicated by the arrows? PROCEDURE BotMover x MOVE_FORWARD REPEAT x Times ROTATE_RIGHT MOVE_FORWARD

My Answer: A; BotMover 1 BotMover 1 BotMover 0

Correction: C; I realize now that the different bot movers plug in the number into x of the program and that’s how the robot moves BotMover 1 BotMover 3 BotMover 0

Q41:Let an original file name be stored in the string variable original. Which of the following statements will correctly extract the description and store it in the string variable descr ?

l. descr <– TrimLeft (TrimRight (original, 4), 11) ll. descr <– TrimLeft (TrimRight (original, 11), 4) lll. descr <– TrimRight (TrimLeft (original, 11), 4)

My Answer: D; II and III

Correction: C; I and III, Trimleft removes the 4 leftmost characters which does the correct operation rather than trimming right.

Q50: Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer.

l. An algorithm that accesses each element in the list twice ll. An algorithm that accesses each element in the list n times lll. An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list Which of the algorithms run in reasonable time?

My Answer: C; I and II only

Correction: D; I, II, and III, All of these options provide a program with reasonable runtime

Q54: Line 1: FOR EACH number IN originalList Line 2: Line 3: IF (number MOD 2 = 0) Line 4: { Line 5: INSERT (newList, 1, number) Line 6: } Line 7: } Which of the following changes, if any, can be made so that the code segment works as intended?

My Answer: A; Changing line 1 to FOR EACH number IN newList

Correction: C; Changing line 5 to APPEND (newList, number), this change allows the program to add the newlist in order at the end

Q58: PROCEDURE AnyPairs (x, y, z) { IF (x = y) { RETURN (true) } ELSE { RETURN (y = z) } } For which of the following procedure calls does the procedure NOT return the intended value?

My Answer: A; AnyPairs (“bat”, “cat”, “rat”)

Correction: C; AnyPairs (“bat”, “cat”, “bat”), this order of pairs makes the program return FALSE through all the operation.