Score
57/67
Journey
- I feel like all of the team teaches this trimester helped with this collegeboard MCQ. I read all the team teaches and did their homework, which helped with a lot of questions. I noticed that most of the topics on the quiz are on the team teaches and their topics, which helps because the team teaches are on the specific college board questions.
- I noticed I was a little weak in pseudocode questions so I reviewed the previous team teaches in last trimester and watched some collegeboard videos.
- Coding the binary project and the previous passion project helped for the quiz as some of the code was familiar when taking the test.
- I prepared for this quiz by looking over the old team teaches and reading the collegeboard key lessons.
Reflection
- I noticed that most of the questions I missed were the pseudocode ones, and I am really confident in theory as it is just memorization.
- I need to get more familiar with sequences and reading questions faster
- Some of the questions took a long time to figure out, but I used the process of elimination for most of them
- I will review the pseudocode a lot but and will review the theory a little bit
Quiz Corrections
Question 10 Ticket prices for a science museum are shown in the following table. (Table Given) 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?
I chose option D but Option B is correct because it initially sets cost to 6 (the cheapest possible ticket price), then increases cost by 2 for people whose age is greater than 12. Regardless of the person’s age, cost is increased by 2 for people going on a guided tour.
Question 12 A file storage application allows users to save their files on cloud servers. A group of researchers gathered user data for the first eight years of the application’s existence. Some of the data are summarized in the following graphs. The line graph on the left shows the number of registered users each year. The line graph on the right shows the total amount of data stored by all users each year. The circle graph shows the distribution of file sizes currently stored by all users. (Model Given) Which of the following best describes the average amount of data stored per user for the first eight years of the application’s existence?
I chose option C, but A is correct because the two line graphs are roughly the same shape. Each value on the right line graph is about 10 times the corresponding value on the left line graph. Therefore, the average amount of data stored per user is about 10 GB.
Question 30 In the following program, assume that the variable n has been initialized with an integer value. Which of the following is NOT a possible value displayed by the program?
I chose option C, but D is correct because the string “out of range” could only be displayed if the condition n ≥ 1 was false. If the initial value of n is at least 0, then n will be incremented by 1, making n at least 1. Therefore the condition n ≥ 1 will be true and “out of range” will not be displayed. If the initial value of n is negative, then n will be multiplied by -1, making n at least 1. Therefore the condition n ≥ 1 will be true and “out of range” will not be displayed.
Question 34 The following question uses a robot in a grid of squares. The robot is represented by a triangle, which is initially facing toward the top of the grid. (Model Given) Consider the procedure below. (Model Given)
I chose option A, but D is correct because in this code segment, the first call to BotMover moves the robot forward one square, rotates it right three times so that it faces left, and moves it forward one square. The second call to BotMover moves the robot forward one square, rotates it right 1 times so that it faces toward the top of the grid, then moves it forward one square. The third call to BotMover moves the robot forward one square, does not rotate it, then moves it forward one square to the upper left corner of the grid.
Question 52 A biologist wrote a program to simulate the population of a sample of bacteria. The program uses the following procedures. (Model Given) Code for the simulation is shown below. (Code Given) Which of the following are true statements about the simulation? I. The simulation continues until either 24 hours pass or the population reaches 0. II. The simulation displays the average change in population per hour over the course of the simulation. III. The simulation displays the total population at the end of the simulation.
I chose option B, but A is correct because the REPEAT UNTIL loop terminates when hours is at least 24 or currentPop is at most 0. Statements II and III are false. The simulation displays the change in population over the entire course of the simulation.
Question 55 The following algorithm is intended to determine the average height, in centimeters, of a group of people in a room. Each person has a card, a pencil, and an eraser. Step 2 of the algorithm is missing. Step 1: All people stand up. Step 2: (missing step) Step 3: Each standing person finds another standing person and they form a pair. If a person cannot find an unpaired standing person, that person remains standing and waits until the next opportunity to form pairs. Step 4: In each pair, one person hands their card to the other person and sits down. Step 5: At this point, the standing person in each pair is holding two cards. The standing person in each pair replaces the top number on their card with the sum of the top numbers on the two cards and replaces the bottom number on their card with the sum of the bottom numbers on the two cards. The sitting partner’s card is discarded. Step 6: Repeat steps 3–5 until there is only one person standing. Step 7: The last person standing divides the top number by the bottom number to determine the average height. Which of the following can be used as step 2 so that the algorithm works as intended?
I chose option B, but A is correct because by starting the process by writing a height at the top of the card and writing a 1 at the bottom of the card, the algorithm will work such that the last person’s card will have the sum of the heights at the top and the number of people at the bottom. The sum of the heights divided by the number of people gives the average height.
Question 56 An online game collects data about each player’s performance in the game. A program is used to analyze the data to make predictions about how players will perform in a new version of the game. The procedure GetPrediction (idNum) returns a predicted score for the player with ID number idNum. Assume that all predicted scores are positive. The GetPrediction procedure takes approximately 1 minute to return a result. All other operations happen nearly instantaneously. Two versions of the program are shown below. (Code Given) Which of the following best compares the execution times of the two versions of the program?
I chose option C, but D is correct because version I calls the GetPrediction procedure once for each element of idList, or four times total. Since each call requires 1 minute of execution time, version I requires approximately 4 minutes to execute. Version II calls the GetPrediction procedure twice for each element of idList, and then again in the final display statement. This results in the procedure being called nine times, requiring approximately 9 minutes of execution time.
Question 64 The following procedure is intended to return the value of x times y, where x and y are integers. Multiplication is implemented using repeated additions. (Model and Code Given) For which of the following procedure calls does the procedure NOT return the intended value? Select two answers.
I chose options A and C, but B and D are correct because since y is initially negative, the loop condition count ≥ y is initially true, so the body of the loop is never executed and 0 is returned and since y is initially negative, the loop condition count ≥ y is initially true, so the body of the loop is never executed and 0 is returned.
Question 65 A program contains the following procedures for string manipulation. (Model and Code Given) Which of the following can be used to store the string “jackalope” in the string variable animal ? Select two answers.
I chose options A and C, but B and C are correct because this code segment stores the substring “lope” in animal. It then concatenates “a” and “lope”, storing the result “alope” in animal. Lastly, it concatenates the substring “jack” and “alope”, storing the result “jackalope” in animal.
Question 67 The procedure NumOccurrences is intended to count and return the number of times targetWord appears in the list wordList. The procedure does not work as intended. (Model Given) For which of the following code segments will the call to NumOccurrences NOT return the intended value? Select two answers.
I chose options A and C, but A and B are correct because for this code segment, count is increased to 1 the first time “maple” is encountered in the list. However, count is reset to 0 when the code segment moves to the next list element. This causes the procedure to return 0 instead of the intended result 1.