Question 1
- The correct answer was C not A because the loop header says that the following program is repeated 4 times. The reason as to why the result of A was wrong was because that result has the incorrect number for the loop header. In comparison to C, A has a loop header of 3 which is shown in the result where the number 3 is only repeated 3 times and C is repeated 4 times.
Question 6
- The correct answer was C not B. Both programs result in the bot moving to the grey square and you can see that if you try both programs out by visiually using the first image on the page. However, I hastily misread the first program which resulted in the robot not making it to the grey square and thus thinking that the second program was the only program that worked.
Question 10
- The correct answer is B not A. This is because A sets cost to 6, then increases cost by 2 for people who are going on a guided tour or whose age is greater than 12. As the cost is only increased once, it is not properly set for people who are both older than 12 and going on a guided tour. Which leads me to believe that B is correct because sets cost to 6 , 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.
Quesiton 21
- The correct answer is B not A. I made a mistake with adding the percantages that are less than 1 MB from the pie graph together, but when you do add them correctly you would get 66% which is not more than 75% so that is incorrect. However, for B if you add the percentages together that are less than 10 MB then you would get 76% which is more than 75%.
Question 22
- The correct answer is D not A. A is incorrect because it simulates a spinner in which there is a 4/6 chance of “Lose a turn”, a 1/6 chance of “Move 2 spaces”, and a 1/6 chance of “Move 1 space”. However, the given spinner has a 6/8 chance of “Move 1 space”, a 1/8 chance of “Move 2 spaces”, and a 1/8 chance of “Lose a turn”.
Question 23
- The answer is D not A. The reason why it’s not answer A is because this expression would be equivalent to an algorithm that sets available to true whenever weekday is true OR miles is less than 20. The algorithm in the flowchart requires both conditions to be true in order to set available to true. Which is why D is correct because using the AND command and the < 20 miles, it makes both conditions true.
Question 30
- The answer is D not C. The reason as to why D is the correct answer is 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 32
- The answer is D not B. The reason why the answer is not B is because it divides the sum of the scores by one less than the number of scores and then subtracts the lowest score, rather than averaging all but the lowest score. As for why the corredct answer is D, that is because it takes the sum of the individual scores and subtracts the lowest score. To obtain the average, the result is divided by one less than the number of scores.
Question 33
- The correct answer is A not B. That is the information in answer B can be determined by calculating the difference between the sum of the scores before the lowest score was dropped and the sum of the scores after the lowest score was dropped. Thus making it incorrect, and answer A is correct because without knowing the individual assignment scores, the administrator is unable to determine any of the student’s individual scores other than the lowest score.
Question 34
- The correct answer is C and not D. In answer D 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. Which doesn’t lead the robot to the grey box.
Question 37
- The answer is A not B. Answer B incorrectly draws the figure and specifically what it does is it will draw four line segments: one with endpoints (2, 6) and (8, 8), one with endpoints (2, 6) and (6, 6), one with endpoints (2, 6) and (4, 4), and one with endpoints (2, 6) and (2, 2). Which is not what the figure is asking us to draw.
Question 45
- The correct answer is D not B. B is incorrect because the variable flip is assigned one of four values: 0, 1, 2, or 3 and the player wins approximately two out of every four times (when flip is 0 or 3).
Question 56
-The correct answer is D not C. The reason as to why C is not correct is because ersvion I calls GetPrediction once for each element of idList, while version II calls GetPrediction twice for each element of idList (plus one more time at the end). Therefore, version II takes more than 1 minute longer than version I.
Question 62
- The correct answers were A and Bn ot B and D. I had originally misread the answer so I accidentally picked answer A instead of D. However the reason why D is incorrect is because x AND y evaluates to false, the body of the IF statement is not executed, and nothing is displayed.
Question 63
- The correct answers are A and B not A and C. The reason as to why C is incorrect and B is correct is because C being the genre, is needed to perform the desired calculation. All books that are not in the specified genre should be filtered out. While B being the Title is not needed to perform the calculation.
Question 64
- THe correct answers are B and D not B and C. I again had misread the answer and accidentally picked C which gave multiply -2, 5 which is incorrect because for these values the procedure repeatedly adds -2 to result five times, resulting in the intended product -10.
Question 65
- The correct answers are B and C not A and C. The reason as to why A is incorrect is because it stores the substring “lope” in animal. It then concatenates “lope” and “a”, storing the result “lopea” in animal. Lastly, it concatenates the substring “jack” and “lopea”, storing the result “jacklopea” in animal.
Question 67
- The correct answers are A and B not A and C. The reason why C is incorrect is because for this code segment, count is increased to 1 when “oak” is encountered as the last element of the list. The loop then terminates and the procedure returns the intended result 1.
Reflection
The CSP quiz experience has been interesting and a little challenging. Even though I received a “ok” grade, I know that there is still room for improvement and an improved understanding of what is covered. First of all, the test helped me with identifying my strengths and weaknesses in different fields. I discovered that I was familiar in areas where I could use my problem-solving abilities, such algorithms and data structures. However, I found it more difficult to understand subjects like networking and security during this time. The importance of constant practice and learning is something that I learned while taking this quiz. It became clear that I need to learn more and go further into the areas that I don’t know too much about. I believe that learning should be approached as a whole, with the goal of both increasing my knowledge in areas of interest and gaining a wide understanding of a variety of topics.
Even though I may have received a “ok” overall on the CSP quiz, I still see it as a chance for improvement. It educates me of the complexity of CS and inspires me to keep studying and growing in the future.