AP Csp Midterm Questions with Detailed
Verified Answers
To qualify for a particular scholarship, a student must have an overall
grade point average of 3.0 or above and must have a science grade
point average of over 3.2. Let overallGPA represent a student's overall
grade point average and let scienceGPA represent the student's science
grade point average. Which of the following expressions evaluates to
true if the student is eligible for the scholarship and evaluates to false
otherwise? ANSWER: (overallGPA ≥ 3.0) AND (scienceGPA > 3.2)
The following grid contains a robot represented as a triangle, which is
initially facing right.
The following code segment is intended to move the robot to the gray
square.
<MISSING STATEMENT>
{
REPEAT 4 TIMES
, 2 | Page
{
MOVE_FORWARD()
ROTATE_RIGHT()
}
ROTATE_LEFT()
MOVE_FORWARD()
ROTATE_RIGHT()
}
Which of the following can be used as a replacement for <MISSING
STATEMENT> so that the code segment works as intended? ANSWER:
REPEAT 2 TIMES
A video-streaming Web site uses 32-bit integers to count the number of
times each video has been played. In anticipation of some videos being
played more times than can be represented with 32 bits, the Web site is
planning to change to 64-bit integers for the counter. Which of the
following best describes the result of using 64-bit integers instead of
Verified Answers
To qualify for a particular scholarship, a student must have an overall
grade point average of 3.0 or above and must have a science grade
point average of over 3.2. Let overallGPA represent a student's overall
grade point average and let scienceGPA represent the student's science
grade point average. Which of the following expressions evaluates to
true if the student is eligible for the scholarship and evaluates to false
otherwise? ANSWER: (overallGPA ≥ 3.0) AND (scienceGPA > 3.2)
The following grid contains a robot represented as a triangle, which is
initially facing right.
The following code segment is intended to move the robot to the gray
square.
<MISSING STATEMENT>
{
REPEAT 4 TIMES
, 2 | Page
{
MOVE_FORWARD()
ROTATE_RIGHT()
}
ROTATE_LEFT()
MOVE_FORWARD()
ROTATE_RIGHT()
}
Which of the following can be used as a replacement for <MISSING
STATEMENT> so that the code segment works as intended? ANSWER:
REPEAT 2 TIMES
A video-streaming Web site uses 32-bit integers to count the number of
times each video has been played. In anticipation of some videos being
played more times than can be represented with 32 bits, the Web site is
planning to change to 64-bit integers for the counter. Which of the
following best describes the result of using 64-bit integers instead of