Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CSP Worksheet 1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Evaluate the mathematical expression: 3 - 6 x 5 + 4

a)

-26

b)

-23

c)

6

d)

3

2.

George will go to a movie theater if there is a movie showing for 4pm or 7pm and he has more than $14 in his wallet. Otherwise, George will watch a movie at home.

In which of the following cases will George go to see a movie?

a)

George has $10 and there is a showing at 7pm

b)

George has $14 and there is a showing at 4pm

c)

George has $15 and there is a showing at 7pm

d)

George has $9 and there is a showing at 7pm

3.

Evaluate the following mathematical expression using x = 6, y = 8, and z = 1/2

z (x + y)

a)

6

b)

7

c)

14

d)

28

4.

If the width of a rug is 5 feet and the total area is 45 square feet, what is the length of the rug?

a)

50

b)

40

c)

9

d)

6

5.

AP CSP is language agnostic, meaning that there is no specific language requirement. The exam reference sheet that provides instructions and explanations to help you understand the format and meaning of the questions you will see on the exam. The exam reference sheet contains two programming formats: text based and block based.

For this problem, refer to the “Robot” section of the AP CSP exam reference sheet. (You have a copy in Canvas.)

Which of theses is a valid Robot command?

a)

MOVE_FORWARD()

b)

MOVE_RIGHT()

c)

MOVE_LEFT()

d)

MOVE_BACK()

6.

AP CSP is language agnostic, meaning that there is no specific language requirement. The exam reference sheet that provides instructions and explanations to help you understand the format and meaning of the questions you will see on the exam. The exam reference sheet contains two programming formats: text based and block based.

For this problem, refer to the “Robot” section of the AP CSP exam reference sheet.

Which of the following code segment moves the Robot 3 spaces forward?

a)

MOVE_FORWARD(3)

b)

MOVE_FORWARD()*3

c)

MOVE_FORWARD_3()

d)

MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD()

7.

AP CSP is language agnostic, meaning that there is no specific language requirement. The exam reference sheet that provides instructions and explanations to help you understand the format and meaning of the questions you will see on the exam. The exam reference sheet contains two programming formats: text based and block based.

For this problem, refer to the “Robot” section of the AP CSP exam reference sheet.

If the Robot is facing North and the following code is executed,

ROTATE_LEFT() ROTATE_LEFT() ROTATE_LEFT()

which direction is Robot facing now?

a)

North

b)

South

c)

East

d)

West

8.

AP CSP is language agnostic, meaning that there is no specific language requirement. The exam reference sheet provides instructions and explanations to help you understand the format and meaning of the questions you will see on the exam. The exam reference sheet contains two programming formats: text-based and block-based. For this problem, refer to the “Robot” section of the AP CSP exam reference sheet.

The following grid contains a robot represented as a triangle. The robot is initially facing East. Which of the following code segments can be used to move the robot to the gray square along the path indicated by the arrows?

a)

MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD() ROTATE_LEFT() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD()

b)

MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD() ROTATE_LEFT() MOVE_FORWARD() MOVE_FORWARD()

c)

ROTATE_LEFT() MOVE_FORWARD() MOVE_FORWARD() ROTATE_RIGHT() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD()

d)

MOVE_FORWARD() MOVE_FORWARD() ROTATE_LEFT() MOVE_FORWARD() MOVE_FORWARD() ROTATE_RIGHT() MOVE_FORWARD()

9.

AP CSP is language agnostic, meaning that there is no specific language requirement. The exam reference sheet that provides instructions and explanations to help you understand the format and meaning of the questions you will see on the exam. The exam reference sheet contains two programming formats: text-based and block-based. For this problem, refer to the “Robot” section of the AP CSP exam reference sheet.

The following grid contains a robot represented as a triangle. The robot is initially facing East. Which of the following code segments can be used to move the robot to the gray square along the path indicated by the arrows?

a)

MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD()

b)

ROTATE_RIGHT() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD()

c)

ROTATE_LEFT() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD()

d)

ROTATE_LEFT() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD() MOVE_FORWARD()

10.

Jordan created a program that has Karel jump hurdles and places a tennis ball tower at the end of the row. Unfortunately, they wrote the program all in one function and their teacher asked them to use top-down decomposition to make the program easier to read. Which of the following sets of functions should Jordan create to BEST demonstrate the principles of top-down decomposition?

a)

Jordon should create a turn right function to make it easier for Karel to turn right when jumping the hurdle.

b)

Jordan should create functions to run to a hurdle, jump a hurdle, run to the end, and place a ball tower at the end.

c)

Jordan should create a function to jump all the hurdles and a function to place the tennis balls.

d)

Jordan should create functions to move forward, turn left, turn right, and place a ball.