APCSP TEST UNIT 4 ACTUAL UPDATED QUESTIONS AND CORRECT
ANSWERS
Programming languages have some similarities and A. Ambiguities in natural language necessitate the creation of programming
differences to the "natural" language you use in everyday languages for controlling a computer
speech. Select the two true statements about B. Compared to the number of words in a natural language, the number of defined
programming languages: words in a programming language is very small.
A. Ambiguities in natural language necessitate the
creation of programming languages for controlling a
computer
B. Compared to the number of words in a natural
language, the number of defined words in a
programming language is very small.
C. The number of defined words in a programming
language is about the same as the number of words in a
natural language.
D. There are typically many possible ways to interpret an
instruction written in a programming language.
, Which of the following images shows the path and
ending location of the robot that will result from
executing the code above. The starting location of the
robot is shown as dotted triangle for cases where the
robot does not start and end at the same location
REPEAT 4 TIMES {
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()
ROTATE_RIGHT(90)
MOVE_FORWARD()
ROTATE_RIGHT(90)
MOVE_FORWARD()
ROTATE_RIGHT(90)
}.
Consider the following incorrect program, which is Line 3 and Line 4
intended to move the robot around the perimeter of a
grid, as indicated by the drawing below. The starting
position and direction of the robot is indicated in the
diagram.
Line 1: 4 TIMES
Line 2: {
Line 3: MOVE_FORWARD()
Line 4: ROTATE_RIGHT()
Line 5: MOVE_FORWARD()
Line 6: MOVE_FORWARD()
Line 7: MOVE_FORWARD()
Line 8: MOVE_FORWARD()
Line 9: ROTATE_RIGHT()
Line 10: }
Which of the following is NOT true about functions in C. Functions cannot make calls to other functions within the same program.
programming?
A. Functions are reusable programming abstractions.
B. Functions help reduce the complexity of writing and
maintaining programs.
C. Functions cannot make calls to other functions within
the same program.
D. Once defined, a function can be called many times
from different parts of a program.
E. Functions help break a problem into logical chunks.
ANSWERS
Programming languages have some similarities and A. Ambiguities in natural language necessitate the creation of programming
differences to the "natural" language you use in everyday languages for controlling a computer
speech. Select the two true statements about B. Compared to the number of words in a natural language, the number of defined
programming languages: words in a programming language is very small.
A. Ambiguities in natural language necessitate the
creation of programming languages for controlling a
computer
B. Compared to the number of words in a natural
language, the number of defined words in a
programming language is very small.
C. The number of defined words in a programming
language is about the same as the number of words in a
natural language.
D. There are typically many possible ways to interpret an
instruction written in a programming language.
, Which of the following images shows the path and
ending location of the robot that will result from
executing the code above. The starting location of the
robot is shown as dotted triangle for cases where the
robot does not start and end at the same location
REPEAT 4 TIMES {
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()
ROTATE_RIGHT(90)
MOVE_FORWARD()
ROTATE_RIGHT(90)
MOVE_FORWARD()
ROTATE_RIGHT(90)
}.
Consider the following incorrect program, which is Line 3 and Line 4
intended to move the robot around the perimeter of a
grid, as indicated by the drawing below. The starting
position and direction of the robot is indicated in the
diagram.
Line 1: 4 TIMES
Line 2: {
Line 3: MOVE_FORWARD()
Line 4: ROTATE_RIGHT()
Line 5: MOVE_FORWARD()
Line 6: MOVE_FORWARD()
Line 7: MOVE_FORWARD()
Line 8: MOVE_FORWARD()
Line 9: ROTATE_RIGHT()
Line 10: }
Which of the following is NOT true about functions in C. Functions cannot make calls to other functions within the same program.
programming?
A. Functions are reusable programming abstractions.
B. Functions help reduce the complexity of writing and
maintaining programs.
C. Functions cannot make calls to other functions within
the same program.
D. Once defined, a function can be called many times
from different parts of a program.
E. Functions help break a problem into logical chunks.