Score: 40/50

Question 2: Which of the following is a characteristic of the fault-tolerant nature of routing on the Internet? Correct Answer: The ability to provide data transmission even when some connections have failed. Explanation: This option is correct. Routers on the Internet are able to move packets through various paths to reach their final destination, even when some connections have failed. This characterizes the fault-tolerant nature of routing.

Question 22: An Internet service provider (ISP) is considering an update to its servers that would save copies of the Web pages most frequently visited by each user.Correct Answer: Web sites that are not visited frequently might no longer be accessible to users. Explanation: This option is correct. The actions of the ISP will only affect how frequently visited pages are loaded into Web browsers. Pages not saved by the ISP are still accessed as they were before.

Question 23: Computers are often used to search through large sets of data to find useful patterns in the data. Which of the following tasks is NOT an example where searching for patterns is needed to produce useful information? Correct Answer: A high school analyzing student grades to identify the students with the top ten highest grade point averages. Explanation: This option is correct. By current standards, a single high school’s list of student grades is not considered a large set of data. Furthermore, identifying 10 students with the highest grade point averages is not an example of finding patterns.

Question 32: Some programming languages use constants, which are variables that are initialized at the beginning of a program and never changed. Which of the following are good uses for a constant? Correct Answer: I and III only. Explanation: This option is correct. A constant is a good choice for statement I and statement III because the value of pi and the number of days in a standard calendar week never change.

Question 37: A graphic artist uses a program to draw geometric shapes in a given pattern. The program uses an algorithm that draws the shapes based on input from the artist. The table shows the approximate number of steps the algorithm takes to draw different numbers of shapes. Correct Answer: The algorithm runs in a reasonable amount of time because it will use approximately n2.

Question 39: Which of the following CANNOT be displayed as a result of executing the code segment? Correct Answer: 1,3,2,4. Explanation: Correct. In the second iteration of the loop, i is equal to 2. Thus RANDOM(1, i) returns either 1 or 2. So, the output 1 3 2 4 is not possible.

Question 43: A computer science student completes a program and asks a classmate for feedback. The classmate suggests rewriting some of the code to include more procedural abstraction. Which of the following is NOT a benefit of procedural abstraction? Correct Answer: Making the code run faster. Explanation: Correct. Modularity and code reuse do not necessarily lead to faster-running code.

Question 44: Which of the following is a true statement about the student’s use of the computer scientist’s search procedure? Correct Answer: The student is reusing the computer scientist’s procedural abstraction by knowing what the procedure does without knowing how it does it. Explanation: Correct. The student knows that the procedure searches for a value without knowing how it does the searching. This is an example of the use of procedural abstraction.

Question 46: The drawLine procedure is to be used to draw the following figure on a coordinate grid. Correct Answer: B. Explanation: Correct. This code segment draws the three line segments shown in the figure. The first call to drawLine draws a line segment with endpoints (1, 5) and (6, 5). The second call to drawLine draws a line segment with endpoints (1, 5) and (6, 7). The third call to drawLine draws a line segment with endpoints (1, 5) and (6, 3).

Question 47: A time stamp indicates the date and time that a measurement was taken. A data scientist has a list containing 10,000 time stamps, sorted in chronological order. Which of the following is closest to the maximum number of values that will need to be examined when performing a binary search for a value in the list? Correct Answer: B. Explanation: Correct. The binary search algorithm starts at the middle of the list and repeatedly eliminates half the elements until the desired value is found or all the elements have been eliminated. For a list with 10,000 elements, the list will be cut in half a maximum of 13 times, with the total of 14 elements needing to be examined. The list will start with 10,000 elements, then will be reduced to 5,000 elements, then to 2,500 elements, then to 1,250 elements, then to 625 elements, then to 312 elements, then to 156 elements, then to 78 elements, then to 39 elements, then to 19 elements, then to 9 elements, then to 4 elements, then to 2 elements, and then, finally, to 1 element. Of the given values, 15 is closest to 14.