wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CSP - Code.org Unit 3 Review

Total questions: 28

Worksheet time: 25mins

Name
Class
Date
1.

In which of the following stages of the development process is a team MOST likely to interview a potential user of an app? Choose two.

a)

investigating and reflecting

b)

designing

c)

prototyping

d)

testing

2.

Which of the following best describes the purpose of a design specification?

a)

Tracking errors that arise through user testing

b)

Documenting comments that will need to be added to a program

c)

Describing the requirements for how a program will work or users will interact with it

3.

What will the "background-color" of the "topButton" be when the program is finished running?

a)

red

b)

orange

c)

blue

d)

green

4.

If the user does NOT click the button what color will "topButton" be when this program finishes running?

a)

red

b)

blue

c)

green

d)

orange

5.

The following program is run. Then the user clicks the "topButton" button ONCE. What will be displayed in the console?

a)
b)
c)
d)
6.

The following program is run. Then the user clicks the "bottomButton" ONCE and then clicks the "topButton" ONCE. What will be displayed in the console?

a)
b)
c)
d)
7.

The following program is run. Then the user clicks the "bottomButton" TWO TIMES. What will be displayed in the console?

a)
b)
c)
d)
8.

Which line of code in this program is MOST likely to result in an error?

a)

Line 1

b)

Line 2

c)

Line 3

d)

Line 4

9.

Which of the following BEST describes the differences between sequential and event-driven programming?

a)

In sequential programming commands run one at a time. In event-driven programming all commands run at the same time.

b)

In sequential programming commands run faster than in event-driven programming.

c)

In sequential programming each command is run many times in sequence. In event-driven programming all commands are run a single time as an event.

d)

In sequential programming commands run in the order they are written. In event-driven programming some commands run in response to user interactions or other events.

10.

Which of the following is NOT a reason to include comments in programs

a)

Comments help the computer decide whether certain components of a program are important.

b)

Comments help programmers debug issues in their own code

c)

Comments help document how code was written for other programmers to use

d)

Comments enable programmers to track their work throughout the development process

11.

The design phase of a program includes. Choose two:

a)

Betas testing

b)

Modifying code

c)

Brainstorming

d)

Diagramming the interface

e)

Debugging error

12.

Comments in your code are (Choose two):

a)

good practice because they help others understand the code

b)

good practice because they facilitate collaboration

c)

bad practice because they present security risks

d)

bad practice because they increase the likelihood of errors

e)

good practice, assuming you are dealing with a higher level language

13.

The investigation stage includes all of the following EXCEPT:

a)

collecting data through surveys

b)

user testing

c)

interviews

d)

direct observations

e)

identifying security breaches

14.

Your company assigns you the task of programming an interface that is compatible with a touch screen. Users should be able to touch the screen to choose menu options. Your task is thus to focus on the program's:

a)

security risk

b)

tactile input

c)

visual processing

d)

memory storage

e)

Visual output

15.

What does the redundancy of routing do?

a)

Increases the reliability of the internet.

b)

Create inefficient wiring

c)

Increases speed

d)

Creates more space

e)

Allows for greater security measures

16.

Which of the following is not an example of a possible output of a software?

a)

Images on the internet

b)

Music from your computer

c)

An email on your screen

d)

A user pressing a button

e)

Money leaving the ATM

17.

Which of the following is NOT a phase in a program's development process?

a)

Testing

b)

Prototyping

c)

Designing

d)

Investigating and Reflecting

e)

Marketing

18.

The NY Times describes the development of a software project:


"The engineer traveled from Palo Alto to Langley with an updated version of the software program. The C.I.A. analysts would test it out and offer feedback, and then the engineers would fly back to California to tweak it."


This describes what type of development process?

a)

iterative

b)

sequential

c)

event based

d)

modular

e)

secured

19.

Which of the following would be considered a logic error (choose one)

a)

The code does not work upon launch due to you forgetting a comma

b)

The code plays the sound of a chicken when you press the image of a pig

c)

The code cannot handle a number outside of the range of defined values

d)

The user inputs 1/0, crashing the program as you cannot divide by zero

e)

The compiler warns you prior to running the program

20.

A program's specifications

a)

defines the program's requirements

b)

explains how the program runs

c)

details the statistics of how the program runs

d)

highlights economic considerations

e)

lists the program's authors

21.

In a particular computing language, I set a variable:


var myNum = 255;


I then modified the variable:


var mySecondNum = myNum + 2;


When I printed out mySecondNum, I received this output:

console.log(mySecondNum);


output:

-252


The error is most likely:

a)

a logic error

b)

overflow error

c)

syntax error

d)

runtime error

e)

all of the errors mentioned

22.

The visual elements of a program through which a user controls or communications the application

a)

Game Screen

b)

Dashboard

c)

Dialog Box

d)

User Interface

e)

Visual System

23.

A student is saving a String into Python in this manner:


myString = "Welcome to this program."


He prints out the statement later in the program, though has a typographical error:


prnt(myString)


What type of error will there be in the program:

a)

logic

b)

syntax

c)

incremental

d)

modular

e)

overflow

24.

All of the following are effective and efficient ways to find and correct program errors that occur during the design of your program, EXCEPT:

a)

hand tracing

b)

debuggers

c)

visualizations

d)

test cases

e)

outsourcing

25.

You have a program that starts like this:


amount <- input("How much will you deposit")


while(amount < 0 or amount == 'Quit')

amount <-input("That is not a legitimate gambling amount. Provide another input or press 'Quit'")


What looks to be the purpose of this while loop?

a)

Converts the input data type to a positive integer

b)

Creates the interface

c)

Checks that the user provides a positive input

d)

Creates an infinite loop

e)

Collaborates with other developers

26.

Planning, storyboarding and brainstorming are included in which phase of developing a program?

a)

Testing

b)

Prototyping

c)

Design

d)

Reporting

e)

debugging

27.

A program is (choose 2)

a)

A collection of physical components that together are used to make a computer function

b)

Hardware, including memory

c)

software

d)

a collection of program statements that performs a specific task when run by a computer

e)

any algorithm

28.

What is a code segment?

a)

code relating to a device driver

b)

a piece of a code that contains executable instructions

c)

a system of words, letters, figures, or other symbols substituted for other words, letters, etc., especially for the purposes of secrecy.

d)

A continuous method of representing information.