MCQ 2 Review

I scored 47/50. The questions I missed were Q10, Q16, and Q39.

Q10

Boolean expressions equivalent to num greater than or equal to 15

The expression less than or equal to does not require the value to be both less than and equal to to be true. This is also mathematically impossible. NOT num < 15 means that num has to be either greater than or equal to 15. I am not sure why I chose the answer I did, but I will not make that mistake again.

Q16

Summing the even numbers in a list

The algorithm needs to choose whether or not the integer is even, so it is going through selection. Sequencing is when the algorithm runs in order, and the original program already does this, as it is computing a sum of several values.

Q39

Robot in maze procedure MoveAndTurn

With the numTurns parameter, I did not think about the fact that the robot can only move right. I saw that the robot was facing forward, and only needed to turn left to reach the pathway, so the answer I put was the robot only turning once. However, it can only turn right, so it will need to turn 3 times right to reach a left turn.