wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AP CSP - Unit 4 Khan Academy

Total questions: 55

Worksheet time: 3hrs 45mins

Name
Class
Date
1.

Jorge is sending a large image file to a friend as part of a shared classroom project. Which of the following is most likely true if Jorge opts to compress the image before sending it?

a)

The image can no longer be represented using bits.

b)

The image will have been converted into an analog form.

c)

The image will require more pixels to display it on the screen.

d)

The image will require fewer bits in order to be represented.

2.

Lucy is completing a project as part of a science class using materials she found online. Which of the following is MOST LIKELY to lead to legal consequences?

a)

Modifying a piece of open source software.

b)

Using open access research for which she does not acquire a license.

c)

Failing to publish her work under a Creative Commons license.

d)

Using images posted online by another student without permission or citation.

3.

Arman takes a picture with his smartphone which he subsequently posts online. Beatrice finds the picture online and posts a copy of it on her website with an attached Creative Commons license. Which of the following best describes who owns the photo?

a)

Beatrice owns the photo because only holders of a Creative Commons license can own works online.

b)

Arman owns the photo because he was the original creator and did not license the work.

c)

Arman owns the photo because it was granted a Creative Commons license by another person online.

d)

Both own the photo because creating a copy makes it her intellectual property.

4.

The smallest unit of data in a computer, represented by a 0 or 1.

a)

Bit

b)

Byte

c)

Binary

d)

Digit

5.

Convert the binary number 00110001 to decimal.

a)

32

b)

121

c)

64

d)

49

6.

Convert the decimal number 68 to binary.

a)

01000100

b)

01100001

c)

01000011

d)

01011001

7.

Error from attempting to represent a number that is too large.

a)

Overflow error

b)

Underflow error

c)

Roundoff error

d)

Debugging error

8.

Abstraction

a)

A simplified representations of something more complex. This lets us hide the details and instead focus on problems at a higher level.

b)

American Standard Code for Information Interchange; the universally recognized raw text format that any computer can understand.

c)

A group of computers and servers that are connected to each other.

d)

Having multiple backups to ensure reliability during cases of high usage or failure.

9.

Data with values that change continuously, or smoothly, over time.

Some examples of analog data include music, colors of a painting, or position of a

sprinter during a race.

a)

Analog Data

b)

Digital Data

c)

Sampling

d)

Metadata

10.

Data that changes discreetly through a finite set of possible values

a)

Analog Data

b)

Digital Data

c)

Sampling

d)

Metadata

11.

A process for creating a digital representation of analog data by measuring the analog data at regular intervals called samples.

a)

Analog Data

b)

Digital Data

c)

Sampling

d)

Metadata

12.

A process for reducing the number of bits needed to represent something in which some information is lost or thrown away. This process is not reversible.

a)

Lossless compression

b)

Lossy compression

c)

Digital compression

d)

Pixel imaging

13.

Public copyright license that enables the free distribution of an otherwise copyrighted work.

a)

Open Access

b)

Creative Commons

c)

Copyright Infringement

d)

Open Source

14.

A process for reducing the number of bits needed to represent something without losing any information. This process is reversible.

a)

Lossless compression

b)

Lossy compression

c)

Digital compression

d)

Pixel imaging

15.

A machine that can run a program, including computers, tablets, servers, routers and smart sensors.

a)

Computing device

b)

Computing system

c)

Computing network

d)

Router

16.

A group of computing devices and programs working together for a common purpose.

a)

Computing device

b)

Computing system

c)

Computing network

d)

Router

17.

A group of interconnected computing devices capable of sending or receiving data.

a)

Computing device

b)

Computing system

c)

Computing network

d)

Router

18.

The series of connections between computing devices on a network starting with a sender and ending with a receiver.

a)

Path

b)

Datastream

c)

Bandwidth

d)

Packet

19.

Data added to packets to help route them through the network and reassemble the original message.

a)

Packet metadata

b)

Packet

c)

IP address

d)

World wide web

20.

The unique number assigned to each device on the Internet.

a)

Packet metadata

b)

Packet

c)

IP address

d)

World wide web

21.

A protocol for sending packets that does error-checking to ensure all packets are received and properly ordered.

a)

Internet protocol (IP)

b)

Transmission control protocol (TCP)

c)

User datagram protocol (UDP)

d)

Hypertext transfer protocol (HTTP)

22.

A protocol for computers to request and share the pages that make up the world wide web on the Internet.

a)

Internet protocol (IP)

b)

Transmission control protocol (TCP)

c)

User datagram protocol (UDP)

d)

Hypertext transfer protocol (HTTP)

23.

Which of the following best describes the protocols used on the Internet?

a)

The protocols of the Internet are designed by government agencies to ensure they remain free to use

b)

The protocols of the Internet are secret to maintain the privacy and security of people using them

c)

Each device connected to the Internet will use a protocol designed by the company that manufactured it

d)

The protocols of the Internet are open and used by all devices connected to the network

24.

Jesse purchases a new smartphone and is immediately able to use it to send a photo over the Internet to a friend who lives in a different country. Which of the following is NOT necessary to make this possible?

a)

Both devices are using the same shared and open protocols

b)

A single direct connection is established between any two devices connected to the Internet

c)

The data of the image is routed through a sequence of directly connected devices before arriving at its destination.

d)

Both devices are directly connected to at least one part of the Internet

25.

This diagram shows a number of computing devices connected to the Internet with each line representing a direct connection.   What is the MINIMUM number of paths that would need to be broken to prevent Computing Device A from connecting with Computing Device E?

a)

1

b)

2

c)

3

d)

4

26.

This diagram shows a number of computing devices connected to the Internet with each line representing a direct connection.   Device A is attempting to send data over the Internet to Device E. Which of the following is true of how the data will travel through the network?

a)

The data will always travel through Device B as it is the shortest path

b)

The data will never be sent to Device G since there are other shorter paths available

c)

It is possible that the data travels through any of the devices in the network before arriving at device E

d)

If the data travels through Device D then it will not travel through Device B

27.

Which of the following is true of how the Internet has responded to the increasing number of devices now using the network?

a)

The Internet protocols are changed every year to adapt to the new devices that have been connected to the network

b)

While the number of devices connected to the Internet has grown, the network itself has not grown

c)

The protocols of the Internet were designed to scale as new devices are added

d)

The protocols of the Internet are no longer necessary thanks to the large number of devices now connected to the network

28.

Emilee is watching an online video. The video is being sent to her laptop by a server over the Internet which splits the video into packets and sends them in the order they appear in the video. Which of the following is true about how the packets will arrive at her computer?

a)

The packets will always be received in the order that they were sent

b)

Either every packet will reach her computer or none of them will.

c)

Packets that arrive out of order will be sent back to the server.

d)

The packets may arrive out of order

29.

Two devices are connected to the Internet and communicating with one another. A squirrel chews through one of the wires in the network that is currently being used by the devices to communicate. The network immediately begins using a different path through the network and communication continues as normal.   This situation best exemplifies which principle?

a)

fault-tolerance

b)

scalability

c)

protocol

d)

pathing

30.

An Internet Service Provider (ISP) is a company that builds the routers and wired connections that allow individuals to access the Internet.   An ISP is considering adding additional redundant connections to its network. Which of the following best describes why the company would choose to do so?

a)

It costs less to design a network that is redundant

b)

The protocols of the Internet only work on networks that are redundant

c)

Redundant networks are more reliable

d)

Adding additional connections reduces the fault-tolerance of the network

31.

Which of the following situations is most likely to cause issues arising from the digital divide?

a)

A state makes voter registration forms available only by visiting a government website

b)

Two internet-connected devices located in different countries and thousands of miles apart attempt to communicate with one another

c)

Packets sent from one router to another begin arriving in a different order than they were sent

d)

A smartphone attempts to communicate over the Internet with another type of device, like a tablet or laptop

32.

Which of the following is MOST likely to be an outcome of the digital divide?

a)

Certain companies will be unable to certify their technology as digitally secure.

b)

People from some racial or ethnic groups have unequal access to computing technology.

c)

People will have equal access and influence both globally and locally.

d)

Political groups in some countries are unable to agree on regulations of digital technology.

33.

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

d)

Listing detailed questions that will be asked of users during interviews

34.

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

a)

red

b)

orange

c)

blue

d)

green

35.

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

a)

cat bird dog

b)

dog cat bird

c)

cat dog bird

d)

bird cat dog

36.

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)

cow pig chicken

b)

cow chicken pig

c)

pig cow chicken

d)

chicken pig cow

37.

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

a)

apple, banana, cherry, cherry, dragon fruit

b)

banana, dragon fruit, cherry, cherry

c)

banana, dragon fruit, apple, apple

d)

banana, cherry, cherry, dragon fruit

38.

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

39.

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.

40.

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

41.

What number will be output by the console.log command on line 7?

a)

10

b)

100

c)

20

d)

200

42.

What number will be output by the console.log command on line 5?

a)

10

b)

11

c)

12

d)

13

e)

16

43.

What number will be output by the console.log command on line 5?

a)

10

b)

25

c)

30

d)

35

44.

What text will be output by the program?

a)

Less than 10

b)

Less than 20

c)

Less than 30

d)

30 or more

45.

What text will be output by the program?

a)

Output A

b)

Output B

c)

Output C

d)

Output D

e)

Output E

46.

What will be the order of letters printed to the console when this program is run?

a)

a b c

b)

a b c b c b c

c)

a b c b c

d)

a b c a

47.

"You win!" never displays. What change would fix this issue?

a)

Line 1 - change variable name to totalScore

b)

Line 3 - remove var

c)

Line 4 - change conditional to score >= 5

d)

Line 5 - change to a getText command

48.

When this function is called, the smaller of two numbers is displayed. What Boolean expression would not work in line 12 in order to accomplish this goal?

a)

num1 == num2

b)

num1 < num2 && num2 > num1

c)

num2 > num1

d)

num1 < num2

49.

This function chooses the screen to display based on the score. What is the correct way to call this function?

a)

CheckWin();

b)

checkWin();

c)

checkwin();

d)

check Win();

50.

There is repeated code in these onEvent blocks. Choose the correct code for the updateScreen() function which would be called in each of the onEvent blocks.

a)

b)

c)

d)

51.
a)

b)

c)

d)

52.

A museum charges different prices based on the day of the week and age of the visitor. The pricing rules are shown below.

On Tuesday and Thursday children 10 and under get in free ($ 0).

For all other days and ages the cost is ten dollars ($ 10).

The visitor's age is stored in the variable age, the day of the week is stored in a variable day, and the price in dollars is stored in the variable price. Which piece of code will correctly decide the price for each ticket.

a)

b)

c)

d)

53.

What will the value of the variable bags be at the end of the flowchart shown here?

a)

1

b)

2

c)

3

d)

4

54.

Choose the correct definition for Conditional Statement

a)

affects the sequential flow of control by executing different statements based on the value of a Boolean expression

b)

stores information as a number, String, or Boolean

c)

joins together two or more strings end-to-end to make a new string

d)

an ordered sequence of characters

55.

Which of the following is true of functions?

a)

Programs written with functions run more quickly

b)

Functions can help remove repeated code from a program

c)

Replacing repeated code with a function will reduce the number of commands the computer needs to run

d)

Functions are called once but can be declared many times