wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

APCSP Semester 1 Review '24-'25

Total questions: 67

Worksheet time: 1hrs 6mins

Name
Class
Date
1.
What is the purpose of DNS?
a)
It assigns a unique address to every device on the Internet.
b)
It returns the IP address given the name of a website.
c)
It forwards a message from one machine to another.
d)
It has more bits so you can make a longer, unique address.
2.
What is the purpose of a router?
a)
It assigns a unique address to every device on the Internet.
b)
It returns the IP address given the name of a website.
c)
It forwards a message from one machine to another.
d)
It has more bits so you can make a longer, unique address.
3.

Transmission Control Protocol (TCP):

a)

Breaks messages into packets and addresses them

b)

A DNS attack in which numerous pings are made to the same IP, causing it to crash

c)

Protocol used by the World Wide Web. It describes how messages are formatted and interchanged, and how web servers respond to commands.

d)

Provides reliable, ordered, and error-checked delivery of a stream of packets on the internet

4.
Internet Protocol:
a)
Breaks messages into packets and addresses them
b)
A DNS attack in which numerous pings are made to the same IP, causing it to crash
c)
Protocol used by the World Wide Web. It describes how messages are formatted and interchanged, and how web servers respond to commands.
d)
Provides reliable, ordered, and error-checked delivery of a stream of packets on the internet
5.
Given the following network diagram, what is the minimum number of connections that must be broken or removed before computer E can no longer communicate with computer B?
a)
1
b)
2
c)
3
d)
4
6.
Which of the following statements about packets is true? 
a)
Packets must be sent in order so they can be reassembled at the end host. 
b)
Packet switching results in a sustained, single connection between two hosts.
c)
All packets must pass through a centralized router to be verified.
d)
None of these statements are true. 
7.
Which of the following protocols is primarily used to establish a secure connection between browsers and servers so that no data is lost?
a)
HTTP
b)
SMTP
c)
SSL/TLS
d)
TCP/IP
8.
Which of the following best describes the basic idea of fault tolerance?
a)
A system that never fails
b)
If part of the system fails, the operation continues without interruption
c)
A program that does not allow inputs out of a range given by a programmer
d)
A program that does not allow loss of precision
9.
Chunks of data sent over the internet are known as...
a)
packets
b)
protocol
c)
port
d)
message
10.
A distributed database that links computer names and their IP addresses
a)
DNS (Domain Name Service)
b)
ISP (Internet Service Provider)
c)
MAC address
d)
modem numbers
11.
_________ are the rules for communication used by computers.
a)
Protocols
b)
Layers
c)
DNS
d)
Virtual networks
12.

The formal name for a piece of info sent by a server to a browser that the browser software saves and sends back to the server.

a)

.txt file

b)

cookie

c)

packets

d)

bits

13.

The idea that Internet service providers should enable access to all content and applications regardless of the source, and without favoring or blocking particular products or websites:

a)

Internet Censorship

b)

Net Neutrality

c)

Digital Divide

d)

Redundancy

14.

During this COVID pandemic, this issue has been a concerning topic with students in various districts across the country having differing access to computing devices and the Internet (which could be due to socioeconomic, geographic, or demographic characteristics):

a)

Internet Censorship

b)

Net Neutrality

c)

Digital Divide

d)

Redundancy

15.

With this protocol in sending packets, split seconds matter more than correcting errors, like video-conferencing, live streaming, online gaming:

a)

UDP

b)

TCP

c)

HTTP

d)

DNS

16.

When sending packets of information, it will typically include "data about the data" which includes the IP address of both where it came from and who it's going to:

a)

Packet Metadata

b)

HTTP

c)

Data Stream

d)

DNS

17.

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

a)

"1"

"3"

"5"

"2"

"4"

b)

"2"

"4"

c)

"1"

"3"

"5"

"4"

"2"

d)

"4"

"2"

e)

"1"

"2"

"3"

"4"

"5"

18.

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

a)

"1"

"2"

"3"

b)

"1"

"3"

c)

"2"

"1"

"3"

d)

"1"

"3"

"2"

19.

Cause the computer to execute the commands you've written in your program

a)

console.log

b)

Run Program

c)

Debug

d)

onEvent

20.

A single instruction for the computer. Put many together and you get algorithms and computer programs.

a)

Algorithm

b)

onEvent

c)

console.log

d)

Command

21.

A set of steps you can follow in order to solve a problem or achieve a result often written down in regular spoken language.

a)

Debugging

b)

Event

c)

Algorithm

d)

Computer Program

22.

What is the definition of an input?

a)

Data that are sent to a computer for processing by a program. Can come in a variety of forms, such as tactile interaction, audio, visuals, or text.

b)

Any data that are sent from a program to a device. Can come in a variety of forms, such as tactile interaction, audio, visuals, or text.

23.
On-screen objects, like buttons, images, text boxes, pull down menus, screens and so on.
a)
UI Elements
b)
Type Elements
c)
Control Elements
d)
All of the above
24.

Which are examples of items that can be included on a User Interface? Select all that apply.

a)

Buttons

b)

Images

c)

Text

d)

Functions

25.

What is the definition of sequential programming?

a)

Program statements run in order, from top to bottom.

b)

Program statements that run when triggered by an event such as a mouse click or key press.

26.

What is the definition of documentation for code?

a)

Lines written into a program to be read by people and does not affect how the program runs.

b)

The code for a specific program, such as the code for an app.

c)

A written description of how a command or piece of code works or was developed.

27.

What is a syntax error?

a)

A mistake in the selection of an ID for event-driven programming.

b)

A mistake in the program where the rules of the programming language is not followed.

c)

A mistake in the binary code of a program.

d)

A mistake that occurs when a program is run but doesn't do what it was intended to do.

28.

This symbol, the equality operator, is used to compare two values, and returns a Boolean (true/false).

a)

=

b)

==

c)

<=

d)

&&

29.
A precise sequence of instructions for processes that can be executed by a computer
a)
Abstraction
b)
Algorithm
c)
Aggregation
d)
ASCII
30.

Any sequence of characters between quotation marks (ex: "hello", "42", "I love APCSP").

a)

Value

b)

String

c)

Variable

d)

Protocol

31.

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

a)

Unlimited Internet

b)

User Interface

c)

Universal Images

d)

User Images

32.
Dictates what portions of the code can "see" or use a variable, typically derived from where the variable was first created. (See Global v. Local)
a)
Variable Scope
b)
Variable View
c)
Variable Protocol
d)
Variable Interface
33.

A placeholder for a piece of information that can change.

a)

Selection

b)

Variable

c)

Loop

d)

Data

34.

What will be displayed if grade is set to 70?

a)

You passed!

b)

Time to start studying again!

c)

You passed! and Time to start studying again!

d)

Nothing will be displayed

35.

Trace the code, and choose the option that correctly shows what will be displayed.

a)

a = 12, b = 20, c = 32

b)

a = 12, b = 12, c = 12

c)

a = 4, b = 12, c = 16

d)

a = 12, b = 20, c = 24

36.

A program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)

a)

Event-driven Program

b)

Boolean Program

c)

Sequential Program

d)

Algorithmic Program

37.

When setting the setPosition command, the coordinates (0,0) begins where on the screen?

a)

Top Right Corner

b)

Bottom Left Corner

c)

Top Left Corner

d)

Bottom Right Corner

38.

A player starts off a game with 3 lives (assigned by a variable named "lives"). After the player runs out of lives and the game is over, a "Play Again" button is pressed to start a new game. What should the programmer include to reset the lives?

a)

Add the code: var lives = 3;

b)

Add the code: lives = 3;

c)

Add the code: reset lives;

d)

No action needed; the game will automatically reset with 3 lives

39.

Which of the following is TRUE regarding = and ==

a)

Use == when declaring/defining a variable (ex. var == score)

b)

Use = in a conditional statement (ex. if (grade = 90))

c)

Use = to update the value of a variable (ex. count = count-1)

d)

Use == to initialize the value of a variable (ex. var lives == 3)

40.

Once a value is assigned to a variable, it cannot be updated with a new value.

a)

True

b)

False

41.

When is a compound condition using the logic operator AND true?

a)

When either of the conditions are true

b)

When both of the conditions are false

c)

When both of the conditions are true

d)

When the NOT operator is also used

42.

Based on the following, determine whether each expression is TRUE or FALSE


var season= “Spring”;


!(season== “Summer”)

a)

True

b)

False

43.

Based on the following, determine whether each expression is TRUE or FALSE


var score= 80;


(score != 90) && (score > 70)

a)

True

b)

False

44.

Based on the following, determine whether each expression is TRUE or FALSE


var month = “March”;


(month== “April”) || (10<12)

a)

True

b)

False

45.

Read the following line of code:


var statement = "Hello my name is " + firstName);


This would be considered an example of:

a)

concentrate

b)

concatenate

c)

conditional statement

d)

selection

46.

What is the result?

a)

You can buy some gum

b)

You are rich

c)

Get a job!

d)

You are rich

Get a job!

47.

It is possible to write a chain of else-if conditions without a final else, in which case it's possible that the whole structure will be skipped.

a)

True

b)

False

48.

What will the value of "score" be at the end of this program?

a)

1

b)

The score is: 8

c)

8

d)

The score is: score

49.

What will be displayed after this code segment is run?

a)

Perfect Game!

b)

You Win!

c)

You Lose!

d)

Nothing Will Be Displayed

50.

The program above asks a user to type in a number and then will output a message. What number will a user need to input for the message "GREEN" to be displayed?

a)

10

b)

20

c)

30

d)

40

51.

Which of the following best describes how computing devices represent information?

a)

A computer will either represent information as bits or bytes but not both

b)

A computer represents data as a byte which is either a 0 or a 1

c)

A computer represents data as bits which is either a 0 or a 1

d)

A computer represents information as bits which contain 8 bytes.

52.

How many bits are in two bytes of data?

a)

4

b)

8

c)

12

d)

16

53.

The binary number 1001 is equal to what in decimal?

a)

1,001

b)

17

c)

8

d)

9

54.

The digit C in hexadecimal is equivalent to what in decimal?

a)

12

b)

13

c)

3

d)

2

55.

With 8 bits of data, what is the largest decimal number that can be represented in binary?

a)

256

b)

1111 1111

c)

255

d)

1000 0000

56.

A computer program is using 4 bits to represent an integer. When the program adds the decimal numbers 10 and 6, the result is 0000. Which of the following describe the result? (Select all that apply)

a)

The number 16 in decimal is 0000 in binary.

b)

An overflow error occurred.

c)

a roundoff error occurred.

d)

You cannot represent the number 16 with 4 bits.

57.

ASCII is an abstraction because

a)

it allows the user to know the binary code for each character.

b)

the user can type letters and other characters without knowing the binary code assigned to them.

c)

it helps the user convert the decimal representation of a letter to the binary representation for the letter.

d)

the user can read a binary message and translate it into characters.

58.

Which of the following statements about sampling is incorrect?

a)

Sampling is a process that can be used to compress an image.

b)

Sampling is a process for turning an analog image into a digital image.

c)

When smaller samples are used, the resulting file will require fewer bytes.

d)

Each pixel of the analog image is coded as one color, and cannot be more than one color.

59.

Given the hexcode A3BD02, which of the following describes the "blue" part of the pixel?

a)

A3

b)

30

c)

B2

d)

02

60.

What is the difference between Lossy and Lossless compression?

a)

With Lossy compression, none of the data is lost.

b)

With Lossless compression, a file cannot be decompressed to its original state.

c)

Lossless compression will usually reduce a file size less than Lossy compression.

d)

Lossy compression is reversible.

61.

Which of the following is most likely to be an unethical use of computer resources?

a)

Purchasing an app and downloading it to a smartphone.

b)

Downloading open source software to your computer.

c)

Purchasing a single-user copy of a photo editing software and sharing your login with another person.

d)

Purchasing a stock photo and putting it in a newsletter that is distributed to a large group of people.

62.

Rapid prototype indicates that....

a)

the prototype does not need creating quickly.

b)

the machine has been on the market for a minute now.

c)

a group of techniques have been used to create, quickly, a model of a device or other type of structure.

d)

the very nature of the term "rapid" is slow down.

63.

James had an idea about creating a much more efficient process of how to account for students in a single class period. It can be assumed that James's method might be considered...

a)

rapid.

b)

not smart.

c)

innovative.

d)

a prototype.

64.

Given var ans = [ ];

what best describes ans?

a)

A string

b)

A list

c)

A value

d)

A boolean

65.

Given the following code (assume the list is zero-indexed):

var student = ["Mark", "Stacy", "Adam", "Matt"];

student [2] = "Fred";

removeItem(student, 1);

What is the value of student[1]?

a)

"Stacy"

b)

"Adam"

c)

"Fred"

d)

Error

66.

How many times will the loop run?

for (var i = 10; i < 15; i++) {

moveForward( );

}

a)

5

b)

10

c)

15

d)

infinite loop

67.

Which of the following does NOT have to be included within a looping structure?

a)

Variable and initial value

b)

Conditional statement

c)

Change in variable value

d)

Function with parameters