Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CSP Unit 3: Intro to App Design - Review Questions

Total questions: 28

Worksheet time: 14mins

Name
Class
Date
1.

Which activity is most helpful early in the app development process?

a)

Writing the entire final program code

b)

Interviewing or observing potential users

c)

Deciding on the final background color

d)

Creating detailed comments for every line of code

2.

What is the primary purpose of a design specification?

a)

Listing all the variable names to be used in the program

b)

Explaining the errors found during the final test run

c)

Describing the requirements and user interaction for the program

d)

Writing the actual code that performs the app's functions

3.

Consider the following code snippet. What is the final background color of the "mainScreen"?

a)

Red

b)

Blue

c)

White (default)

d)

Green

4.

In the following code, what is the THIRD and final thing displayed in the console if the user clicks the "myButton" once?

a)

banana

b)

carrot

c)

apple

5.

In the following code, what is the FIRST thing displayed in the console if the user clicks the "myButton" once?

a)

banana

b)

carrot

c)

apple

6.

In the following code, what is the SECOND thing displayed in the console if the user clicks the "myButton" once?

a)

banana

b)

carrot

c)

apple

7.

Which line of code will MOST LIKELY result in an error?

a)

console.log("Result:");

b)

console.log(100);

c)

console.log(Result);

d)

console.log("100");

8.

A program is created to calculate an average grade. The user enters three grades and clicks a "Calculate" button. What serves as the Input in this scenario?

a)

The "Calculate" button being clicked

b)

The final average grade displayed on screen

9.

Which option best distinguishes event-driven from sequential programming?

a)

Sequential code runs faster; event-driven code runs slower.

b)

Sequential code has fewer errors; event-driven code has more errors.

c)

Sequential commands run in written order; event-driven commands run based on user action.

d)

Event-driven programming is only for web apps; sequential is for all other apps.

10.

What is NOT a benefit of adding comments to your code?

a)

Helps other programmers understand how the code was written.

b)

Helps a programmer debug issues in their own code later.

c)

Documents the purpose of complex blocks of code.

d)

They cause the program to run faster on the computer.

11.

In pseudocode, if the instruction DISPLAY("A") is immediately followed by DISPLAY("B"), what is the output?

a)

AB

b)

B A

c)

A B

d)

A then a new line then B

12.

In the pseudocode expression x ← 5 + 3, what is the final value stored in the variable x?

a)

5 + 3

b)

8

c)

x

d)

5

13.

What is the most significant benefit of using pseudocode when planning a program?

a)

It can be run on any computer instantly without installation.

b)

It prevents all errors in the final written program.

c)

It can represent coding concepts common to many programming languages.

d)

It automatically translates into the final programming language code.

14.

What is displayed after the following pseudocode runs?

DISPLAY ("Smile")

DISPLAY ("Now")

a)

SmileNow

b)

Smile Now

c)

Now Smile

d)

Smile
Now

15.

What does the onEvent() block in event-driven programming specify?

a)

The order in which the program's initial commands run

b)

What code should run when a user interacts with a specific element

c)

How quickly the program should execute its functions

d)

The variable names that need to be used in the program

16.

What will be displayed in the console when this program finishes running?

a)

55

b)

5

"5"

c)

5

d)

"5"

5

17.

Which of the following is an example of an event in event-driven programming?

a)

Assigning a value to a variable

b)

The user clicking a button

c)

Running a calculation

d)

The program starting up

18.

Which of the following is NOT a helpful action when debugging a program?

a)

Using comments to "turn off" sections of code to isolate a bug

b)

Printing variable values to the console to check their status

c)

Writing out the entire final code without testing any small sections

d)

Running the program with different inputs to reproduce the error

19.

What is the final value of the variable count after this pseudocode runs?

count ← 10
count ← count + 5

a)

10

b)

5

c)

15

d)

105

20.

In a text-based programming language, what is the best way to temporarily ignore a line of code during debugging?

a)

Delete the line entirely

b)

Move the line to the bottom of the code

c)

Add a comment symbol (like // or #) at the start of the line

d)

Change the line's background color

21.

What is displayed after this pseudocode runs?

DISPLAY(":")

DISPLAY(")")

a)

: )

b)

":" ")"

c)

:)

d)

:

)

22.

In the code snippet below, what is the last property change applied to the "titleLabel"?

a)

The color is set to "red"

b)

The color is set to "blue"

c)

The font-size is set to 20

d)

The font-size is set to the default value

23.

Which term best describes the input given to a program?

a)

The final screen the user sees

b)

The background calculations the program performs

c)

The documentation and comments in the code

d)

The data or action provided by the user (e.g., text, button click)

24.

If an AP CSP pseudocode instruction is a ← b, and b has the value 10, what is the value of a immediately after the instruction runs?

a)

A. 10

b)

B. b

c)

C. The value of a remains unchanged.

d)

D. An error occurs.

25.

What programming concept involves writing code that reacts to specific occurrences like a mouse click or key press?

a)

Sequential Flow

b)

Debugging

c)

Event-Driven Programming

d)

Iterative Development

26.

In JavaScript, which of the following is correctly identified as a String data type?

a)

true

b)

2.5

c)

78

d)

"true"

27.

Which JavaScript value below is correctly identified as a Number data type, which can be used for mathematical operations?

a)

'42'

b)
true
c)
42
d)

"Hello"

28.

Why would a programmer store a U.S. phone number (e.g., "(555) 555-1234") as a String instead of a Number in JavaScript?

a)

The value is too long and will exceed the maximum value for a Number.

b)

The Number data type can only store integers (whole numbers).

c)

The value contains characters (parentheses and hyphens) that are not numerical digits.

d)

Strings use less memory than Numbers in modern programming languages.