Reviewing Missed Questions
Question | My Answer | Correct Answer | Explanation |
---|---|---|---|
Q22: Two grids are shown below. Each grid contains a robot represented as a triangle. Both robots are initially facing left. Each robot can move into a white or gray square, but cannot move into a black region. For each grid, the program below is intended to move the robot to the gray square. The program uses the procedure Goal_Reached ( ), which evaluates to true if the robot is in the gray square and evaluates to false otherwise. |
Neither grid I not grid II | Grid I only | In Grid I, the robot moves forward to the end of the bottom row, turns right twice, moves forward twice, turns right twice, moves forward until the end of the middle row, turns left twice, moves forward twice, turns left twice, and moves forward until Goal_Reached is true. |
Q28: |
tempString ← substring(oldString, 3, len(oldString) - 2) newString ← substring(tempString, 1, len(tempString) - 2) AND newString ← substring(oldString, 3, len(oldString) - 2) |
tempString ← substring(oldString, 3, len(oldString) - 2) newString ← substring(tempString, 1, len(tempString) - 2) AND newString ← substring(oldString, 3, len(oldString) - 4) |
First choice was correct, but second was not. To remove the first 2 characters of oldString, this code segment takes a substring starting at position 3. To remove the last 2 characters of oldString, the substring ends at the position that is 4 characters less than the length of oldString (since 4 characters are removed). |
Q50: |
Algorithms A and B | Algorithms A and D | D: The number of steps for this algorithm is equal to the length of the list squared, as the number of steps is equal to n2 for a list of size n. This is an example of a polynomial efficiency and indicates that the algorithm runs in a reasonable amount of time. B (incorrect): As the size of the list grows, the number of steps needed to sort the list grows at an exponential rate, as the number of steps is equal to 2n for a list of size n. This indicates that the algorithm does not run in a reasonable amount of time. |
Topics I need to practice
- 1.4, Identifying and Correcting Errors:
- 3.4, Strings:
- 3.17, Algorithmic Efficiency:
Overall Comments
I did better on this MCQ than previous ones, but there are still some topics that I am not proficient in (Algorithmic Efficiency, Identifying Errors) and vocabulary I need to brush up on. I think by reviewing the AP Daily Videos, looking back at older lessons, and reviewing my vocab list will help me improve.