My Score

I scored a 77% or 54/70, which is barely a 1.0

Journey

Increased understanding: The entire team imparted a wealth of information to help me grasp the concepts tested in the quiz. Enhanced preparation: Engaging in additional practice problems and tests afforded me a clearer understanding of what to expect on the exam.

Question 8

Which of the following best describes a direct benefit in using redundant routing on the Internet?

A Redundancy enables messages to be transmitted with as few packets as possible. B Redundancy enables network devices to communicate with as few network connections as possible. C Redundancy often allows messages to be sent on the network even if some network devices or connections have failed. D Redundancy prevents network communications from being intercepted by unauthorized individuals.

What I Chose and Why it’s Wrong

I chose B, the correct answer was C because Redundancy within a system usually requires additional resources, not fewer. A path within a redundant system may be longer than the shortest possible path.

Question 15

Procedure Call drawLine(x1, y1, x2, y2) Explanation Draws a line segment on a coordinate grid with endpoints at coordinates (x1, y1) and (x2, y2)

The drawLine procedure is to be used to draw the following figure on a coordinate grid.

A xVal 1 yVal 0 len 1 REPEAT 5 TIMES { drawLine(xVal, yVal, xVal, yVal + len) xVal xVal + 1 len len + 1 } B xVal 1 yVal 0 len 1 REPEAT 5 TIMES { drawLine(xVal, yVal, xVal + len, yVal) yVal yVal + 1 len len + 1 } C xVal 5 yVal 0 len 5 REPEAT 5 TIMES { drawLine(xVal, yVal, xVal, yVal + len) xVal xVal - 1 } D xVal 5 yVal 0 len 5 REPEAT 5 TIMES { drawLine(xVal, yVal, xVal + len, yVal) yVal yVal - 1 len len - 1 }

What I Chose and Why it’s Wrong

I Chose D, correct answer was A. D was wrong because This code segment draws five horizontal line segments, starting with the segment from (5, 0) to (10, 0) and ending with the segment from (5, -4) to (6, -4).

Question 37

In the following code segment, assume that the variable n has been initialized with an integer value.

IF n > 10 ———————— IF n > 100 DISPLAY “artichoke” ELSE DISPLAY “broccoli” ———————— ELSE ———————— IF n > 100 DISPLAY “carrot” ELSE DISPLAY “daikon” ————————

Which of the following is NOT a possible value displayed by the program? Responses A: “artichoke” B: “broccoli” C: “carrot” D: “daikon”

What I Answered and Why it’s wrong

Answered C, correct D The string “daikon” is displayed for values of n that are less than or equal to 10.

Question 39

A store uses binary numbers to assign a unique binary sequence to each item in its inventory. What is the minimum number of bits required for each binary sequence if the store has between 75 and 100 items in its inventory? Responses A: 5 B: 6 C: 7 D: 8

What I Answered and Why it’s Wrong

Answered D, correct C Using 8 bits will allow for up to 256 sequences because . However, a unique bit sequence can be assigned using only 7 bits because 2 raised to 7 = 128.

Question 42

Consider the following code segment.


integerList <– 4, 2, 5, 4, 2, 3, 1, result <– 0 FOR EACH item IN integerList result <– (result + item MOD 2) DISPLAY result

What value is displayed as a result of executing the code segment?

A: 3 B: 4 C: 9 D: 12

What I Answered and Why it’s Wrong

Answered C Correct A This result would be displayed if the code segment computed the sum of the odd values in the list rather than counting the number of odd values in the list.

Question 44

A program developed for a Web store represents customer account balances using a format that approximates real numbers. While testing the program, a software developer discovers that some values appear to be mathematically imprecise. Which of the following is the most likely cause of the imprecision?

A: The account balances are represented using a fixed number of bits, resulting in overflow errors. B: The account balances are represented using a fixed number of bits, resulting in round-off errors. C: The account balances are represented using an unlimited number of bits, resulting in overflow errors. D: The account balances are represented using an unlimited number of bits, resulting in round-off errors.

What I Answered and Why it’s Wrong

Answered C Correct B Programming languages typically represent numbers with a fixed number of bits. The use of a fixed number of bits can lead to overflow or round-off errors.

Question 45

The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing right. Consider the following procedure.

PROCEDURE botStepper n REPEAT n TIMES MOVE_FORWARD ROTATE_LEFT REPEAT n TIMES MOVE_FORWARD ROTATE_RIGHT

A The figure presents two lines of code. Throughout the code there are nested blocks of code, as follows. Line 1: [begin block] botStepper [begin block] 2 [end block] [end block] Line 2: [begin block] botStepper [begin block] 3 [end block] [end block] B The figure presents two lines of code. Throughout the code there are nested blocks of code, as follows. Line 1: [begin block] botStepper [begin block] 3 [end block] [end block] Line 2: [begin block] botStepper [begin block] 4 [end block] [end block] C The figure presents three lines of code. Throughout the code there are nested blocks of code, as follows. Line 1: [begin block] botStepper [begin block] 2 [end block] [end block] Line 2: [begin block] MOVE_FORWARD [end block] Line 3: [begin block] botStepper [begin block] 3 [end block] [end block] D The figure presents three lines of code. Throughout the code there are nested blocks of code, as follows. Line 1: [begin block] botStepper [begin block] 3 [end block] [end block] Line 2: [begin block] MOVE_FORWARD [end block] Line 3: [begin block] botStepper [begin block] 4 [end block] [end block]

What I Answered and Why it’s Wrong

Chose B, answered C

In this code segment, the first call to botStepper moves the robot forward three squares, rotates it left so that it faces toward the top of the grid, moves it forward three squares, and rotates it right so that it faces right. The second call to botStepper attempts to moves the robot forward four squares, off the edge of the grid, causing execution to terminate.

Question 47

In column B, the price range represents the typical cost of a meal, where “lo” indicates under $10, “med” indicates $11 to $30, and “hi” indicates over $30. In column D, the average customer rating is set to -1.0 for restaurants that have no customer ratings. A (avgRating ≥ 4.0) AND ((prcRange = “lo”) AND (prcRange = “med”)) B (avgRating ≥ 4.0) AND ((prcRange = “lo”) OR (prcRange = “med”)) C (avgRating ≥ 4.0) OR ((prcRange = “lo”) AND (prcRange = “med”)) D (avgRating ≥ 4.0) OR ((prcRange = “lo”) OR (prcRange = “med”))

What I Answered and Why it’s Wrong

Chose C Answer B

This expression will evaluate to true for restaurants with a correct customer rating and will evaluate to false for restaurants with an incorrect customer rating, regardless of the price range. The intent is to return true only for restaurants with the correct price range and the correct customer rating.

Question 49

A Any problem can be solved algorithmically, though some algorithmic solutions may require humans to validate the results. B Any problem can be solved algorithmically, though some algorithmic solutions must be executed on multiple devices in parallel. C Any problem can be solved algorithmically, though some algorithmic solutions require a very large amount of data storage to execute. D There exist some problems that cannot be solved algorithmically using any computer.

What I Answered and Why it’s Wrong

Chose A Answer D

While some solutions benefit from being validated by a human, not all problems can be solved with an algorithm.

Question 50

Which of the following best explains how symmetric encryption algorithms are typically used? Responses A Symmetric encryption uses a single key that should be kept secret. The same key is used for both encryption and decryption of data. B Symmetric encryption uses a single key that should be made public. The same key is used for both encryption and decryption of data. C Symmetric encryption uses two keys that should both be kept secret. One key is used for encryption, and the other is used for decryption. D Symmetric encryption uses two keys. The key used for encryption should be made public, but the key used for decryption should be kept secret.

What I Answered and Why it’s Wrong

Chose C Answer A

Symmetric encryption uses a single key.

Question 54

Delivery trucks enter and leave a depot through a controlled gate. At the depot, each truck is loaded with packages, which will then be delivered to one or more customers. As each truck enters and leaves the depot, the following information is recorded and uploaded to a database.

The truck’s identification number The truck’s weight The date and time the truck passes through the gate Whether the truck is entering or leaving the depot Using only the information in the database, which of the following questions CANNOT be answered? Responses A On which day in a particular range of dates did the greatest number of trucks enter and leave the depot? B What is the average number of customer deliveries made by each truck on a particular day? C What is the change in weight of a particular truck between when it entered and left the depot? D Which truck has the shortest average time spent at the depot on a particular day?

What I Answered and Why it’s Wrong

Chose D Answer A

This information can be determined by analyzing the dates and times that trucks entered and left the depot.

Question 55

wer

A code segment is intended to transform the list utensils so that the last element of the list is moved to the beginning of the list.

For example, if utensils initially contains [“fork”, “spoon”, “tongs”, “spatula”, “whisk”], it should contain [“whisk”, “fork”, “spoon”, “tongs”, “spatula”] after executing the code segment.

Which of the following code segments transforms the list as intended? Responses A len LENGTH(utensils) temp utensils[len] REMOVE(utensils, len) APPEND(utensils, temp) B len LENGTH(utensils) REMOVE(utensils, len) temp utensils[len] APPEND(utensils, temp) C len LENGTH(utensils) temp utensils[len] REMOVE(utensils, len) INSERT(utensils, 1, temp) D len LENGTH(utensils) REMOVE(utensils, len) temp utensils[len] INSERT(utensils, 1, temp)

What I Answered and Why it’s Wrong

Chose B Answer C

This code segment removes the last element of the list, then attempts to access an element at index len. This causes an error because there is no longer an element at index len.

Question 57

A certain computer has two identical processors that are able to run in parallel. The following table indicates the amount of time it takes to execute each of four processes on a single processor. Assume that none of the processes is dependent on any of the other processes.

Process Execution Time on Either Processor P 30 seconds Q 10 seconds R 20 seconds S 15 seconds Which of the following parallel computing solutions would minimize the amount of time it takes to execute all four processes? Responses A Running processes P and Q on one processor and processes R and S on the other processor B Running processes P and R on one processor and processes Q and S on the other processor C Running processes P and S on one processor and processes Q and R on the other processor D Running process P on one processor and processes Q, R, and S on the other processor

What I Answered and Why it’s Wrong

Chose B Answer A

Running processes P and R on one processor will take a total of 50 seconds. Running processes Q and S on the other processor will take a total of 25 seconds. With the processors running in parallel, this solution will take 50 seconds; the optimal solution takes only 40 seconds.

Question 64

In the following procedure, the parameter age represents a person’s age. The procedure is intended to return the name of the age group associated with age. People who are under 18 are considered minors, people who are 65 and older are considered senior citizens, and all other people are considered adults. The procedure does not work as intended.

Line 1: PROCEDURE ageGroup(age) Line 2: { Line 3: result “adult” Line 4: IF(age ≥ 65) Line 5: { Line 6: result “senior citizen” Line 7: } Line 8: RETURN(result) Line 9: Line 10: result “adult” Line 11: IF(age < 18) Line 12: { Line 13: result “minor” Line 14: } Line 15: RETURN(result) Line 16: } Removing which two lines of code will cause the procedure to work as intended?

Select two answers. response - incorrect Responses A Line 3 B Line 8 C Line 10 D Line 15

What I Answered and Why it’s Wrong

Chose A & C Answer B & C

This line should not be removed. The variable result is assigned the value “adult” by default and then assigned the value “senior citizen” or “minor” only when appropriate.

Question 67

Spinner Question

What I Answered and Why it’s Wrong

Chose A & B Answer A & D

For this spinner, there is a 25% chance of “blue”. The remaining 75% of the time, “orange” and “purple” are equally likely. If the first call to RANDOM returns 1 (which occurs 25% of the time), the code segment prints “blue”. Otherwise, if the second call to random returns 1 (which occurs 50% of the time that “blue” does not occur), the code segment prints “orange”. The other 50% of the time that “blue” does not occur, the code segment prints “purple”.

Question 70

A programmer wants to create a new string by removing the character in position n of the string oldStr. For example, if oldStr is “best” and n is 3, then the new string should be “bet”. Assume that 1 < n < len(oldStr).

Which of the following code segments can be used to create the desired new string and store it in newStr ?

Select two answers. response - incorrect Responses A left substring(oldStr, 1, n - 1) right substring(oldStr, n + 1, len(oldStr)) newStr concat(left, right) B left substring(oldStr, 1, n + 1) right substring(oldStr, n - 1, len(oldStr)) newStr concat(left, right) C newStr substring(oldStr, 1, n - 1) newStr concat(newStr, substring(oldStr, n + 1, len(oldStr))) D newStr substring(oldStr, n + 1, len(oldStr)) newStr concat(newStr, substring(oldStr, 1, n - 1))

What I Answered and Why it’s Wrong

Chose C & D Answer A & D

D is the wrong code cell.

Takeaways

I received a 54 instead of 66 on the quiz, indicating areas where I struggled and need to focus on for improvement.

Skills to Focus On

Using abstraction to manage complexity in a program (Skill 3.B) Implementing and applying algorithms (Skill 2.B) Evaluating computing based on legal and ethical factors (Skill 5.E)

AP Exam Study

Practice tests and problems Reviewing concepts and code Watching AP College Board videos Reviewing team teaches and main topics from lessons

Conclusion

While I’m satisfied with my progress, scoring a 54 highlights areas for improvement. I’ll focus on enhancing skills in abstraction, algorithm implementation, and ethical evaluation. To prepare further, I’ll review lessons and videos from AP College Board. This quiz was valuable practice, identifying areas for growth and strengths in my understanding of AP CSP concepts.