MC Review

Score: 62/67

  • Question 5 False, True, True, True With these inputs, the OR gate will produce an output of true and the first AND gate will produce an output of false. Since only one input to the second AND gate will be true, the circuit will have an output of false.

I was unsure of what the differences were between the And gate and Or gate. I thought that the and gate didn’t need both of them to be true.

  • Question 11 Ivory The binary RGB triplet for light yellow is (11111111, 11111111, 11100000). I didn’t know the binary for ivory so I guessed. I tried to work on this with my group, but we were unsure.

  • Question 23 D This expression would be equivalent to an algorithm that sets available to true whenever weekday is true and miles is at least 20. The algorithm in the flowchart requires both conditions to be true in order to set available to true.

I miss saw the less than symbol which messed me up. It stated that if it was true it would have to be less than 20 which was the orrect answer

  • Question 64 B, D Since 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.

It is true whenever y is initially negative because this makes the sequence have to repeat untill its larger. When the number is positive it wont repeat unless the count is even larger.

  • Question 67 A, B For this code segment, count is increased to 1 when “oak” is encountered as the last element of the list. The loop then terminates and the procedure returns the intended result 1.’

I ended up clicking more than two answers, but the reason I clicked it was because I thought that the list would reset and return the intended amount.