My Score

My Corrections

My answer is wrong because mine is not multplying by 3 the command that says repeat 3 times indicates multiplication and I used addition. This is also in correct because iff the value of y was 2, the inner loop would repeat two times and the outer loop would repeat three times. The statement result <--- result + 1 would be executed 3 times 2, or six times. When y = 2, the value of y + 3 is 5, not 6.

My answer is wrong because eventually the loop will reach 7 wheras with 6 it won't because the number is always going to be odd. This is also incorrect because the value of the variable j starts at 1 and increases by 2. If < MISSING CONDITION > is replaced with the expression j = 7, the expression will evaluate to true when j is 7 and the loop will end.

The robot can only be in one of four squares in the grid, given that p is a positive integer. These squares include the starting position, two squares above facing up, two squares above and two to the right facing right, or two to the right facing left. The position depicted is not a possible final location.

I got part of the question correct, but B is not correct because it will not get the robot to the gray square, but C will, so the answers are A and C. A is correct because with each iteration of the Repeat 4 times loop, the robot will move one square to the left and one square up and will remain facing up. After four of these iterations, the robot will finish in the gray square.

A is wrong because it should draw the circle after the radius and y value is adjusted, this is also why B is correct. D has the same error it draws the circle before the y and r values are adjusted, which is why C is correct, so the 2 answers are C and B.

A is incorrect because only at some times value will be 2 and make the procedure true, but everytime the number is going to be even, which is why C is correct. A is also incorrect because if the initial value of number is 4, the REPEAT UNTIL loop will reduce the value of number to 2, and then to 0, at which point the loop will terminate. The procedure will return true, not false.

C is not correct because there is no way for the robot to end above the starting position (it either goes left or right,) which is why B must be correct. It is also incorrect because the robot turns right one, two, or three times and could end up in a square to the left of its initial position. It cannot end up in a square above its initial position.

This question was confusing and I did not really understand what they were asking for, but I put B and C and the answers were A and D. According to college board the answer is not B becuase, The statement Random (1, 5) could evaluate to 1, 2, 3, 4, or 5. There is a two out of five, or 40 percent, chance that it could evaluate to 1 or 2. If this happens, the value of sum is increased by 1, which simulates a person voting for the candidate. This does not match the goal of the program, which is to simulate an election in which a certain candidate is expected to receive 20 percent of the vote.

Answer B is incorrect (interchanging line 5 and line 6) because since they are both inside of FOR EACH loop interchanging them will not affect the number of operations performed. Answer D is correct (interchanging line 7 and line 8) because then you will be able to find the final average instead of having it keep repeating and getting different averages.