Test Corrections (3/7)

Question 19

For this question, I answered that ‘Only elements that appear in inputList1 but not in inputList2’, but the answer was ‘Only elements that appear in both inputList1 and inputList2’. This is because the list is searched for elements that appear in both lists, not just one list, which I skipped over by accident.

Question 22

For this question, I didn’t think either grid would make the arrow move correctly, but I think I missinterpreted the way the arrow moves. The answer would have been A, because the sequence the arrow moves in would make it correct.

Question 29

I answered with 3 true’s, but the answer should have been 3 false’s. This is because A would have been false, and the false value would have made all 3 print values false. I missinterpreted it to set each value to ‘true’ instead of ‘false’, and ignored that the multiple trues would set it to false.

Question 33

I chose ‘repeat 4 times’, but the answer would be 2 times instead. I miscounted the rotations, so that’s why my answer was off.

Question 38

For this question, I thought the correct answer would have (num < 0 ) displaying negative would be the same, and I was correct there, but the order of the function is wrong. (num = 0) would have been in a different position than what I selected, as using the parameter num = 0 would allow for something to be assigned to this variable beforehand.

Question 39

I thought that adding a line towards the end of the code, and using N, would make the count accurate, but adding a line to count between 6 and 7 (where the movement actually is) would make the count go up correctly. This is because the count should count at the end of the movement, not the end of the turn, because it could count the turn as a movement and make the count go up wrong.

Question 44

I wasn’t quite sure how the function would exactly look when printed, so I got a bit confused as to how it would actually look printed. B would actually be the right answer.

Questoin 45

I selected one correct answer, but the answer for A was incorrect. This is because procedral abstraction is supposed to allow a larger block of code to be named, so it is easier to access.

Question 50

I wasn’t sure which algorithm would run the shortest, so I assumed that at least B would work. However, A and D are the shortest, because they can run more steps for the same size list.