Question Review
Final Score = 39/50
Question 14

- My Answer: A
Why did I choose this?
- I chose A because I thought that freeware and shareware were not good things and for some reason I thought they would be risks for the user.
Why was it wrong?
-
The answer I chose didn’t accurately represent the question. Freeware or shareware is generally intended for download onto a home computer and this use is considered ethical.
-
Right Answer: C
Why?
- Single-user copies of software are meant for one individual to use. Computer labs are meant for public use, so installing the software on the computers raises ethical concerns.
Question 22

- My Answer: D
Why did I choose this?
- I don’t really know why I chose this one I honestly can’t see a reason I picked D
Why was it wrong?
-
The answer was A because it actually was grid I and only not gird II
-
Right Answer: A
Why?
- 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.
Question 29

- My Answer: C
Why did I choose this?
- I Chose this option because I though that a and c were true because a had to be c which is true and now c is true and true again.
Why was it wrong?
-
The fourth statement assigns the value false to a. The fifth statement assigns the value false to c.
-
Right Answer: B
Why?
- The first three statements assign values to the variables. The fourth statement assigns the value of (NOT (a OR b)) AND c to a. Since a OR b is true, NOT (a OR b) is false, so (NOT (a OR b)) AND c is false. The fifth statement assigns the value of c AND a to c. Since a is now false, c AND a is false. The last three statements display the values of the variables.
Question 31

- My Answer: B
Why did I choose this?
- I think I chose the wrong answer and was rushing when I originally took it because it makes more sense to me how it would be that the conditions is that it isn’t so you turn on the motor.
Why was it wrong?
-
This algorithm will turn on the motor in some cases when the gate is already open.
- Right Answer: D
Why?
- The algorithm continues past the first check if the time is during business hours, the algorithm continues past the second check if the gate sensor is activated, and the algorithm continues past the third check if the gate is not open. Performing the checks in this order will ensure that the gate is opened only under the appropriate conditions.
Question 33

- My Answer: D
Why did I choose this?
- I chose this because I was honestly really confused and in my head it wouldn’t click so I just gave it my best effort but I was never really confident in my answer.
Why was it wrong?
-
This code segment leaves the robot four rows above its starting position and two rows above the gray square.
-
Right Answer: B
Why?
- The loop that repeats four times returns the robot to its starting position. The three lines of code that follow the loop move the robot one row up and leave it facing right. When this has been repeated twice, the robot is in the gray square.
Question 34

- My Answer: C
Why did I choose this?
- I chose C because I messed up with the one section where it says rotate right instead of rotate left.
Why was it wrong?
-
The robot needs to rotate right instead of left after the block of 2 moves forward.
-
Right Answer: D
Why?
- The robot moves forward three spaces, turns to the left, moves forward two spaces, turns to the right, and moves forward three spaces.
Question 36

- My Answer: A
Why did I choose this?
- I chose A because I thought that the score had to be greater than or equal to 90 and I don’t think that I completely understood this code segment very well.
Why was it wrong?
-
Code segment III works correctly. Code segment III assigns “C” when the numeric score is less than 80, or “B” if the numeric score is not less than 80 but is less than or equal to 90, or “A” otherwise.
-
Right Answer: D
Why?
- Code segment I does not work correctly because it is not possible for “C” to be the value of grade at the end of the code segment. Code segment II correctly assigns “A” when the numeric score is greater than 90, or “B” if the numeric score is not greater than 90 but is greater than or equal to 80, or “C” otherwise. Code segment III assigns “C” when the numeric score is less than 80, or “B” if the numeric score is not less than 80 but is less than or equal to 90, or “A” otherwise.
Question 40

- My Answer: B
Why did I choose this?
- I chose this answer because I thought it would make sense to replace the the rotate right command to a left command.
Why was it wrong?
-
After moving forward two squares, if the robot were to turn left, then the next move forward would put the robot beyond the edge of the grid.
-
Right Answer: D
Why?
- In order for the robot to move from the gray square back to its original position, it must move forward two squares, turn right, move forward four squares, turn left, and move forward two squares. The same set of moves can be used in both directions, so no change is needed to the algorithm.
Question 41

- My Answer: A
Why did I choose this?
- I chose A because I thought that the values needed to be stored as binary or decimal numbers in order to fulfill what is needed but in reality thats not the case.
Why was it wrong?
-
The values can be stored in any numerical base as long as they are sorted.
-
Right Answer: B
Why?
- In order for a binary search on a list to work as intended, the list must be sorted.
Question 45

- My Answer: A and C
Why did I choose this?
- I chose A instead of D because I thought protection was a part of the possible answer, Also, I didn’t choose D because I thought choice A suited it better but it didn’t
Why was it wrong?
-
For answer A being wrong: procedural abstraction does not prevent programmers from reusing code written by other programmers. D was also the other answer choice.
-
Right Answer: C and D
Why?
- Procedural abstraction helps improve code readability. Also,pProcedures created to solve subproblems of a larger problem are called by name.
Question 50

- My Answer: B and D
Why did I choose this?
- I chose B(the wrong answer) because I saw an exponential pattern by 2. I saw this pattern and tought it would make sense but this was not the linear pattern we were looking for.
Why was it wrong?
-
Algorithm B is wrong because 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.
-
Right Answer: A and D
Why?
- As the size of the list grows, the number of steps needed to sort the list grows at a linear rate, as the number of steps is equal to 10n for a list of size n, an example of a polynomial efficiency and indicates that the algorithm runs in a reasonable amount of time. 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, an example of polynomial efficiency and indicates that the algorithm runs in a reasonable amount of time.