Font size
WorksheetsAPCSP Semester 1 Review '24-'25
Total questions: 67
Worksheet time: 1hrs 6mins
Transmission Control Protocol (TCP):
Breaks messages into packets and addresses them
A DNS attack in which numerous pings are made to the same IP, causing it to crash
Protocol used by the World Wide Web. It describes how messages are formatted and interchanged, and how web servers respond to commands.
Provides reliable, ordered, and error-checked delivery of a stream of packets on the internet
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.
.txt file
cookie
packets
bits
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:
Internet Censorship
Net Neutrality
Digital Divide
Redundancy
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):
Internet Censorship
Net Neutrality
Digital Divide
Redundancy
With this protocol in sending packets, split seconds matter more than correcting errors, like video-conferencing, live streaming, online gaming:
UDP
TCP
HTTP
DNS
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:
Packet Metadata
HTTP
Data Stream
DNS
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?
"1"
"3"
"5"
"2"
"4"
"2"
"4"
"1"
"3"
"5"
"4"
"2"
"4"
"2"
"1"
"2"
"3"
"4"
"5"
The program above is run. Then the user clicks the "blueButton" button ONCE. What will be displayed in the console?
"1"
"2"
"3"
"1"
"3"
"2"
"1"
"3"
"1"
"3"
"2"
Cause the computer to execute the commands you've written in your program
console.log
Run Program
Debug
onEvent
A single instruction for the computer. Put many together and you get algorithms and computer programs.
Algorithm
onEvent
console.log
Command
A set of steps you can follow in order to solve a problem or achieve a result often written down in regular spoken language.
Debugging
Event
Algorithm
Computer Program
What is the definition of an input?
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.
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.
Which are examples of items that can be included on a User Interface? Select all that apply.
Buttons
Images
Text
Functions
What is the definition of sequential programming?
Program statements run in order, from top to bottom.
Program statements that run when triggered by an event such as a mouse click or key press.
What is the definition of documentation for code?
Lines written into a program to be read by people and does not affect how the program runs.
The code for a specific program, such as the code for an app.
A written description of how a command or piece of code works or was developed.
What is a syntax error?
A mistake in the selection of an ID for event-driven programming.
A mistake in the program where the rules of the programming language is not followed.
A mistake in the binary code of a program.
A mistake that occurs when a program is run but doesn't do what it was intended to do.
This symbol, the equality operator, is used to compare two values, and returns a Boolean (true/false).
=
==
<=
&&
Any sequence of characters between quotation marks (ex: "hello", "42", "I love APCSP").
Value
String
Variable
Protocol
The visual elements of an program through which a user controls or communications the application.
Unlimited Internet
User Interface
Universal Images
User Images
A placeholder for a piece of information that can change.
Selection
Variable
Loop
Data
What will be displayed if grade is set to 70?
You passed!
Time to start studying again!
You passed! and Time to start studying again!
Nothing will be displayed
Trace the code, and choose the option that correctly shows what will be displayed.
a = 12, b = 20, c = 32
a = 12, b = 12, c = 12
a = 4, b = 12, c = 16
a = 12, b = 20, c = 24
A program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)
Event-driven Program
Boolean Program
Sequential Program
Algorithmic Program
When setting the setPosition command, the coordinates (0,0) begins where on the screen?
Top Right Corner
Bottom Left Corner
Top Left Corner
Bottom Right Corner
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?
Add the code: var lives = 3;
Add the code: lives = 3;
Add the code: reset lives;
No action needed; the game will automatically reset with 3 lives
Which of the following is TRUE regarding = and ==
Use == when declaring/defining a variable (ex. var == score)
Use = in a conditional statement (ex. if (grade = 90))
Use = to update the value of a variable (ex. count = count-1)
Use == to initialize the value of a variable (ex. var lives == 3)
Once a value is assigned to a variable, it cannot be updated with a new value.
True
False
When is a compound condition using the logic operator AND true?
When either of the conditions are true
When both of the conditions are false
When both of the conditions are true
When the NOT operator is also used
Based on the following, determine whether each expression is TRUE or FALSE
var season= “Spring”;
!(season== “Summer”)
True
False
Based on the following, determine whether each expression is TRUE or FALSE
var score= 80;
(score != 90) && (score > 70)
True
False
Based on the following, determine whether each expression is TRUE or FALSE
var month = “March”;
(month== “April”) || (10<12)
True
False
Read the following line of code:
var statement = "Hello my name is " + firstName);
This would be considered an example of:
concentrate
concatenate
conditional statement
selection
What is the result?
You can buy some gum
You are rich
Get a job!
You are rich
Get a job!
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.
True
False
What will the value of "score" be at the end of this program?
1
The score is: 8
8
The score is: score
What will be displayed after this code segment is run?
Perfect Game!
You Win!
You Lose!
Nothing Will Be Displayed
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?
10
20
30
40
Which of the following best describes how computing devices represent information?
A computer will either represent information as bits or bytes but not both
A computer represents data as a byte which is either a 0 or a 1
A computer represents data as bits which is either a 0 or a 1
A computer represents information as bits which contain 8 bytes.
How many bits are in two bytes of data?
4
8
12
16
The binary number 1001 is equal to what in decimal?
1,001
17
8
9
The digit C in hexadecimal is equivalent to what in decimal?
12
13
3
2
With 8 bits of data, what is the largest decimal number that can be represented in binary?
256
1111 1111
255
1000 0000
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)
The number 16 in decimal is 0000 in binary.
An overflow error occurred.
a roundoff error occurred.
You cannot represent the number 16 with 4 bits.
ASCII is an abstraction because
it allows the user to know the binary code for each character.
the user can type letters and other characters without knowing the binary code assigned to them.
it helps the user convert the decimal representation of a letter to the binary representation for the letter.
the user can read a binary message and translate it into characters.
Which of the following statements about sampling is incorrect?
Sampling is a process that can be used to compress an image.
Sampling is a process for turning an analog image into a digital image.
When smaller samples are used, the resulting file will require fewer bytes.
Each pixel of the analog image is coded as one color, and cannot be more than one color.
Given the hexcode A3BD02, which of the following describes the "blue" part of the pixel?
A3
30
B2
02
What is the difference between Lossy and Lossless compression?
With Lossy compression, none of the data is lost.
With Lossless compression, a file cannot be decompressed to its original state.
Lossless compression will usually reduce a file size less than Lossy compression.
Lossy compression is reversible.
Which of the following is most likely to be an unethical use of computer resources?
Purchasing an app and downloading it to a smartphone.
Downloading open source software to your computer.
Purchasing a single-user copy of a photo editing software and sharing your login with another person.
Purchasing a stock photo and putting it in a newsletter that is distributed to a large group of people.
Rapid prototype indicates that....
the prototype does not need creating quickly.
the machine has been on the market for a minute now.
a group of techniques have been used to create, quickly, a model of a device or other type of structure.
the very nature of the term "rapid" is slow down.
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...
rapid.
not smart.
innovative.
a prototype.
Given var ans = [ ];
what best describes ans?
A string
A list
A value
A boolean
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]?
"Stacy"
"Adam"
"Fred"
Error
How many times will the loop run?
for (var i = 10; i < 15; i++) {
moveForward( );
}
5
10
15
infinite loop
Which of the following does NOT have to be included within a looping structure?
Variable and initial value
Conditional statement
Change in variable value
Function with parameters
