Quiz Corrections 61/66

Problem 1

I got this wrong because the code segment necer changes second. The correct answer is B because the code segment assigns the initial value of first to temp, then assigns the initial value of second to first. The initial value of first, which has been stored in temp, is then assigned to second. Therefore, the initial values of first and second have been interchanged.

Problem 14

I got this wrong because the programs display different values. The correct answer was C because The programs each display ten values, but each value displayed by program B is one greater than the corresponding value from program A. Program A displays 1 2 3 4 5 6 7 8 9 10 and program B displays 2 3 4 5 6 7 8 9 10 11.

Problem 31

I got this wrong because both programs correctly move the robot to the gray square. The correct answer is C because program I correctly moves the robot to the gray square by repeatedly moving the robot forward, rotating left, moving forward, and rotating right. Program II correctly moves the robot to the gray square by moving the robot forward to the upper-right corner of the grid, rotating left, and moving forward to the upper-left corner of the grid.

Problem 35

I got this wrong because using samples from nondigital sound sources could put the musician at risk of violating copyright laws. The correct answer is D because Creative Commons licenses can be used by creators of digital music to specify how the samples can be used by others. A no-rights-reserved license allows others to freely make use of the samples. Also, I misclicked :)!

Problem 44

I got this wrong because the operation 10 plus 7 causes an overflow error, but 12 plus 3 does not produce a result large enough to cause an overflow error.. The correct answer is B because With a 4-bit integer representation, 2 to the fourth power values can be represented, which allows for the values between 0 to 15, inclusive. If an operation results in a value greater than 15, an overflow error will occur. Of the operations given in the options, only 10 plus 7 gives a result larger than 15.