Skip to the content.

MCQ Corrections pt2

MCQ Corrections pt2

MCQ Topics I missed for 2020

image-2.png

Area to Work On Score Area of Strength Score
1.4: Identifying and Correcting Errors 14% 1.3: Program Design and Development 100%
2.1: Binary Numbers 40% 2.2: Data Compression 100%
3.6: Conditionals 0% 3.3: Mathematical Expressions 100%
3.8: Iteration 40% 3.4: Strings 100%
3.12: Calling Procedures 40% 3.5: Boolean Expressions 100%
4.2: Fault Tolerance 50% 3.7: Nested Conditionals 100%
3.17: Algorithmic Efficiency 50% 3.11: Binary Search 100%
5.4: Crowdsourcing 50% 3.15: Random Values 100%
5.5: Legal and Ethical Concerns 67% 3.16: Simulations 100%
3.9: Developing Algorithms 75% 4.1: The Internet 100%
2.3: Extracting Information from Data 71% 5.2: Digital Divide 100%

MCQ Practice Test Corrections

Table of Contents


Question 67: Loop Counter

image.png

Original Answer: A & C

Corrected Answer: A & B

Explanation: In this code segment, the count variable is reset to 0 each time the loop iterates over a new element in the list. This causes the procedure to return 0 instead of the intended count of occurrences. For example, if the list contains the word “maple” once, the count is increased to 1 when “maple” is encountered, but it is reset to 0 when the loop moves to the next element, resulting in an incorrect return value of 0.


Question 64: Loop Condition

image.png

Original Answer: C & D

Corrected Answer: B & D

Explanation: Because 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 63: Binary Numbers

image.png

Original Answer: A & D

Corrected Answer: A & B

Explanation: To calculate the desired calculation, you don’t need the title.


Question 62: Boolean Logic

image.png

Original Answer: B & D

Corrected Answer: A & B

Explanation: Because x OR y evaluates to true, the body of the IF statement is executed. Since x is true, true is displayed.


Question 60: List Operations

image.png

Original Answer: C

Corrected Answer: D

Explanation: This code creates newList1 and newList2, which contain unique elements from list1 and list2, respectively. These are combined into bothList, and duplicate elements are removed to form uniqueList. The correct count is the difference in their lengths.


Question 59: Open-Source Software

image.png

Original Answer: D

Corrected Answer: C

Explanation: Open-source software is released under a license that grants users the right to use and distribute its source code. However, there is no guarantee that the original developer will offer user support.


Question 58: Conditional Logic

image.png

Original Answer: B

Corrected Answer: C

Explanation: For this set of inputs, false is returned despite two values being equal. The IF condition x = y evaluates to false, triggering the ELSE block. There, the expression y = z also evaluates to false, resulting in false being returned.


Question 55: Average Height Algorithm

image.png

Original Answer: C

Corrected Answer: A

Explanation: By beginning with a height at the top of the card and a 1 at the bottom, the algorithm ensures that the last person’s card contains the total sum of heights at the top and the total count of people at the bottom. Dividing these values gives the average height.


Question 54: List Manipulation

image.png

Original Answer: A

Corrected Answer: C

Explanation: The code iterates through originalList from left to right, inserting even elements at the beginning of newList. This results in a reversed order of even elements in newList. Changing line 5 to APPEND(newList, number) instead places even values at the end, preserving their original order.


Question 53: Crowdsourcing

image.png

Original Answer: B

Corrected Answer: C

Explanation: This system utilizes an application to recruit a large group of people to assist in locating a lost pet.


Question 52: Simulation

image.png

Original Answer: D

Corrected Answer: A

Explanation: Statement I is true—the REPEAT UNTIL loop stops when hours reaches at least 24 or currentPop is at most 0. Statements II and III are false. The simulation tracks and displays population changes throughout its duration.


Question 50: Algorithm Efficiency

image.png

Original Answer: C

Corrected Answer: D

Explanation: For an algorithm to run in reasonable time, its steps must be bounded by a polynomial function. Algorithm I accesses elements (2n) times (twice for each of (n) elements), which is considered reasonable. Algorithm II accesses elements (n^2) times (once for each pair of (n) elements), which is also reasonable. Algorithm III accesses 10 elements, a constant number, which is always reasonable.


Question 49: Binary Representation

image.png

Original Answer: B

Corrected Answer: C

Explanation: Using 7 bits allows for representing up to 128 unique values, which can accommodate up to 128 employees. Since each bit can represent two possible states (0 or 1), the total number of unique combinations or distinct values that can be represented with 7 bits is ( 2^7 = 128 ). This makes 7-bit representation suitable for systems where there is a need to assign a unique identifier to each employee in a group of up to 128, ensuring that every individual can be represented without overlap.


Question 44: Network Connectivity

image.png

Original Answer: A

Corrected Answer: B

Explanation: If the connections between U and V and between U and P were removed, then computer T and computer U can no longer communicate.


Question 39: Loop Sum Calculation

image.png

Original Answer: B

Corrected Answer: C

Explanation: As it currently stands, the program doesn’t include the first element of the list in the sum because i is incremented before nums[i] is added to sum. By swapping these two lines of code, the program will correctly include all of the first ten elements of the list when calculating the sum.


Question 34: Robot Movement

image.png

Original Answer: A

Corrected Answer: C

Explanation: In this code segment, the first call to BotMover moves the robot forward one square, rotates it right once so it faces right, and then moves it forward one more square. The second call to BotMover moves the robot forward one square, rotates it right three times so it faces toward the top of the grid, and then moves it forward one square. The third call to BotMover moves the robot forward one square, does not rotate it, and then moves it forward to the gray square.


Question 23: Boolean Logic Flowchart

image.png

Original Answer: A

Corrected Answer: D

Explanation: The flowchart sets available to true whenever weekday is true and miles is less than 20, and sets available to false otherwise.


Question 20: Data Storage

image.png

Original Answer: D

Corrected Answer: A

Explanation: The two line graphs have a similar shape, with each value on the right graph being approximately 10 times the corresponding value on the left graph. As a result, the average amount of data stored per user is approximately 10 GB.


Question 18: Robot Movement

image.png

Original Answer: C

Corrected Answer: B

Explanation: This code segment moves the robot forward as long as there is an open square in front of it. Once it encounters a blocked square, the robot rotates right. Starting from its initial location, the robot moves to the upper right corner of the grid, then rotates right. It then moves to the bottom right corner, rotates right again, moves to the bottom left corner, rotates right once more, and finally moves forward two squares to reach the gray square.


Question 16: List Traversal

image.png

Original Answer: C

Corrected Answer: D

Explanation: The program traverses wordList starting from the end of the list and moving towards the start, removing any elements that are equal to “the” or “a”. Inserting this statement between lines 7 and 8 decrements index after checking each list element, ensuring that every element is checked as the list is modified.


Question 12: Binary Representation

image.png

Original Answer: A

Corrected Answer: C

Explanation: The decimal number 75 can be represented as 64 + 8 + 2 + 1, which corresponds to 2⁶ + 2³ + 2¹ + 2⁰ in powers of two. This results in the binary representation 01001011. Similarly, the decimal number 0 is represented in binary as 00000000. The decimal number 130 is equivalent to 128 + 2, or 2⁷ + 2¹ in powers of two, which gives the binary value 10000010.


Question 11: Binary Colors

image.png

Original Answer: B

Corrected Answer: A

Explanation: The binary number 11111111 corresponds to 2⁷ + 2⁶ + 2⁵ + 2⁴ + 2³ + 2² + 2¹ + 2⁰, which equals 255. Similarly, the binary number 11110000 represents 2⁷ + 2⁶ + 2⁵ + 2⁴, which totals 240. As a result, this binary triplet corresponds to the color ivory.