AP-CSP QUESTIONS WITH LATEST ANSWER KEY 2025/ 2026.
Which of the following best explains the ability to solve problems algorithmically?
(A) Any problem can be solved algorithmically, though some algorithmic solutions may require humans
to
validate the results.
(B) Any problem can be solved algorithmically, though some algorithmic solutions must be executed on
multiple
devices in parallel.
(C) Any problem can be solved algorithmically, though some algorithmic solutions require a very large
amount
of data storage to execute.
(D) There exist some problems that cannot be solved algorithmically using any computer. - (answer)(D)
There exist some problems that cannot be solved algorithmically using any computer.
2. The grid below contains a robot represented as a triangle, initially facing right. The robot can move
into a white or
gray square but cannot move into a black region.
The code segment below uses the procedure GoalReached,
which evaluates to true if the robot is in the gray
square and evaluates to false otherwise?
REPEAT UNTIL (GoalReached ())
{
<MISSING CODE>
}
Which of the following replacements for <MISSING CODE> can be used to move the robot to the gray
square?
(A)
REPEAT UNTIL (CAN_MOVE (forward) = false)
, AP-CSP QUESTIONS WITH LATEST ANSWER KEY 2025/ 2026.
{
ROTATE_RIGHT ()
}
MOVE_FORWARD ()
(B)
REPEAT UNTIL (CAN_MOVE (forward) = false)
{
MOVE_FORWARD ()
}
ROTATE_RIGHT ()
(C)
REPEAT UNTIL (CAN_MOVE (right))
{
ROTATE_RIGHT ()
}
MOVE_FORWARD ()
(D)
REPEAT UNTIL (CAN_MOVE (right))
{
MOVE_FORWARD ()
}
ROTATE_RIGHT () - (answer)(B)
REPEAT UNTIL (CAN_MOVE (forward) = false)
{
MOVE_FORWARD ()
}
ROTATE_RIGHT ()
Which of the following best explains the ability to solve problems algorithmically?
(A) Any problem can be solved algorithmically, though some algorithmic solutions may require humans
to
validate the results.
(B) Any problem can be solved algorithmically, though some algorithmic solutions must be executed on
multiple
devices in parallel.
(C) Any problem can be solved algorithmically, though some algorithmic solutions require a very large
amount
of data storage to execute.
(D) There exist some problems that cannot be solved algorithmically using any computer. - (answer)(D)
There exist some problems that cannot be solved algorithmically using any computer.
2. The grid below contains a robot represented as a triangle, initially facing right. The robot can move
into a white or
gray square but cannot move into a black region.
The code segment below uses the procedure GoalReached,
which evaluates to true if the robot is in the gray
square and evaluates to false otherwise?
REPEAT UNTIL (GoalReached ())
{
<MISSING CODE>
}
Which of the following replacements for <MISSING CODE> can be used to move the robot to the gray
square?
(A)
REPEAT UNTIL (CAN_MOVE (forward) = false)
, AP-CSP QUESTIONS WITH LATEST ANSWER KEY 2025/ 2026.
{
ROTATE_RIGHT ()
}
MOVE_FORWARD ()
(B)
REPEAT UNTIL (CAN_MOVE (forward) = false)
{
MOVE_FORWARD ()
}
ROTATE_RIGHT ()
(C)
REPEAT UNTIL (CAN_MOVE (right))
{
ROTATE_RIGHT ()
}
MOVE_FORWARD ()
(D)
REPEAT UNTIL (CAN_MOVE (right))
{
MOVE_FORWARD ()
}
ROTATE_RIGHT () - (answer)(B)
REPEAT UNTIL (CAN_MOVE (forward) = false)
{
MOVE_FORWARD ()
}
ROTATE_RIGHT ()