Score: 49/52

49/52

Corrections

Question 30

q30 The answer was D because the column goes backwards so 15, 25, 35, 45 are all printed first.

Question 38

q38 The answer was D because When i has the value 4, temp is assigned the value “l”. When i has the value 3, “p” is appended to temp, resulting in “lp”. When i has the value 2, “p” is appended to temp again, resulting in “lpp”. In the last iteration of the for loop, i has the value 1 and “a” is appended to temp, resulting in “lppa”.

Question 47

q47 In the body of the first if clause in the code segment, b1 retains the value true if num is between 0 and 100, exclusive. In the body of the else clause, b1 retains the value true if num is less than -100. The statement assigns true to b2 if num is less than -100 or between 0 and 100, exclusive.