Font size
WorksheetsAP CSP First Semester Final Exam Review 2021-22
Total questions: 108
Worksheet time: 2hrs 21mins
Statements that should only run upon a specific user action should be placed
inside an onAction block
below an onEvent command
after the first programming statement
within an onEvent programming statement
What is Binary?
a way of representing information using only two options, 1 and Zero
8 bits
data that changes discretely through a finite set of possible values
a process for reducing the number of bits needed to represent something without losing any information
Bit?
8 bytes
a contraction of "binary digit." The single unit of info in a computer, typically represented as a 0 or a 1
a way of representing information using only two options
a process for creating a digital representation of analog data
Byte?
4 bits
6 bits
8 bits
A yard
Overflow Error?
error from attempting to represent a number that is too large
error from attempting to represent a number that is too precise. the value is rounded.
error in processing data for a collection of public copyright licenses
error when data changes discretely through a finite set of possible values
Round-off Error?
error from attempting to represent a number that is too large
error from attempting to represent a number that is too precise. the value is rounded.
error in processing data for a collection of public copyright licenses
error when data changes discretely through a finite set of possible values
Analog data?
a data collection of public copyright licenses that enable the free distribution of an otherwise copyrighted work, used when an author wants to give people the right to share, use, and build upon a work that they have created
data that changes discretely through a finite set of possible values
data with values that change continuously, or smoothly, over time. Some examples include music, the colors of a painting, or the position of a sprinter during a race.
a data process for reducing the number of bits needed to represent something without losing any information
Digital data?
a data collection of public copyright licenses that enable the free distribution of an otherwise copyrighted work, used when an author wants to give people the right to share, use, and build upon a work that they have created
data that changes discretely through a finite set of possible values
data with values that change continuously, or smoothly, over time. Some examples include music, the colors of a painting, or the position of a sprinter during a race.
a data process for reducing the number of bits needed to represent something without losing any information
Sampling?
A way of representing information using only two options
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 process for creating a digital representation of analog data by measuring the analog data at regular intervals called ......
A process for reducing the number of bits needed to represent something without losing any information. This process is reversible.
Lossless Compression?
A way of representing information using only two options
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 process for creating a digital representation of analog data by measuring the analog data at regular intervals called ......
A process for reducing the number of bits needed to represent something without losing any information. This process is reversible.
Lossy Compression?
A way of representing information using only two options
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 process for creating a digital representation of analog data by measuring the analog data at regular intervals called ......
A process for reducing the number of bits needed to represent something without losing any information. This process is reversible.
Intellectual property?
A work or invention that is the result of creativity, such as a piece of writing or a design, to which one has rights and for which one may apply for a patent, copyright, trademark, etc.
A collection of public copyright licenses that enable the free distribution of an otherwise copyrighted work, used when an author wants to give people the right to share, use, and build upon a work that they have created
Data owned that changes discretely through a finite set of possible values
A personal process for reducing the number of bugs within a program by reducing the number of bits required to store the program
Creative Commons?
A work or invention that is the result of creativity, such as a piece of writing or a design, to which one has rights and for which one may apply for a patent, copyright, trademark, etc.
A collection of public copyright licenses that enable the free distribution of an otherwise copyrighted work, used when an author wants to give people the right to share, use, and build upon a work that they have created
Data owned that changes discretely through a finite set of possible values
A personal process for reducing the number of bugs within a program by reducing the number of bits required to store the program
Which is an example of input?
Google Maps reading the directions aloud
Google Maps using your current location to determine the estimated arrival time
You type in your desired destination into Google Maps
Google Maps storing your home and work locations
Which is an example of output?
Google Maps reading the directions aloud
Google Maps using your current location to determine the estimated arrival time
You type in your desired destination into Google Maps
Google Maps storing your home and work locations
What is Event-Driven Programming?
A program that has a lot of parties.
A program that follows the sequential flow of control.
A program that executes only when triggered.
A program that drives cars.
What is Event-Driven Programming?
A program that has a lot of parties.
A program that follows the sequential flow of control.
A program that executes only when triggered.
A program that drives cars.
The development process is incremental and _______.
slow
boring
iterative
permanent
Which is an example of an event-driven program?
Pressing up, up, down, down, left, right, left, right, B, A, select, start on your controller.
Pressing the spacebar to pause your YouTube video.
Clicking on Alonzo to begin the game.
All of the above.
Program documentation is a written description of the function of a code segment, event, procedure, or program and how it was developed.
True
False
What are the benefits for commenting your code?
Helps organize your code.
Reminds you of what your code does.
Others can understand your code.
All of the above.
Which are types of input? Select all that apply.
Keyboard
Mouse click
Touch (tablet)
None of these.
Which are types of output? Select all that apply.
Audio
Text
Images and video
Mouse Click
What is the number 45 as a binary number?
10011111
00001100
00101101
10101010
What is a computer?
An electronic device that receives input, processes it and provides an output in the desired format.
An electronic device to do homework, play video games or surf on the internet.
An electronic device that receives input, stores or processes the input and provides an output in the desired format.
What is a computer network?
a single computer
2 or more computers that connect
a set of rules
a hub that connects to the internet
_____________ is an international network of computers.
Network
WWW
Internet
Local Area Network
WWW stands for
Whole wide web
World wide web
world web wide
wide world web
The address of the web page is called _____________
HTTP
HTML
UTP
URL
A group of computing devices and programs working together for a common purpose.
Computing Device
Computing System
Computing Network
Path
A group of interconnected computing devices capable of sending or receiving data.
Computing Device
Computing System
Computing Network
Path
The series of connections between computing devices on a network starting with a sender and ending with a receiver.
Computing Device
Computing System
Computing Network
Path
The maximum amount of data that can be sent in a fixed amount of time, usually measured in bits per second.
Computing Device
Bandwidth
Computing Network
Path
The unique number assigned to each device on the Internet.
Protocol
IP Address
Internet Protocol (IP)
Router
A protocol for sending data across the Internet that assigns unique numbers (IP addresses) to each connected device.
Protocol
IP Address
Internet Protocol (IP)
Router
A type of computer that forwards data across a network.
Protocol
IP Address
Internet Protocol (IP)
Router
The inclusion of extra components so that a system can continue to work even if individual components fail
Protocol
Redundancy
Internet Protocol (IP)
Router
Can continue to function even in the event of individual component failures. This is important because elements of complex systems like a computer network fail at unexpected times, often in groups.
Protocol
Redundancy
Fault Tolerant
Router
The visual elements of an program through which a user controls or communications the application. Often abbreviated UI.
User Interaction
User Interface
User Iteration
User I
A program.
An Icon
A set of instructions for your computer
A handbook
A blueprint
The following figure represents a network of physically linked devices labeled P through S. A line between two devices indicates a connection. Devices can communicate only through the connections shown. Which of the following statements best explains the ability of the network to provide fault tolerance?
The network is considered fault-tolerant because there are redundant paths between each pair of devices.
The network is considered fault-tolerant because it guarantees that no individual component will fail.
The network is not considered fault-tolerant because it relies on physical connections.
The network is not considered fault-tolerant because it provides more paths than are needed.
Which of the following is an advantage of a lossless compression algorithm over a lossy compression algorithm?
A lossless compression algorithm can guarantee that compressed information is kept secure, while a lossy compression algorithm cannot.
A lossless compression algorithm can guarantee reconstruction of original data, while a lossy compression algorithm cannot.
A lossless compression algorithm typically allows for faster transmission speeds than does a lossy compression algorithm.
A lossless compression algorithm typically provides a greater reduction in the number of bits stored or transmitted than does a lossy compression algorithm.
A command or instruction. Sometimes also referred to as a code statement.
Input
Output
Program Statement
Documentation
A collection of program statements. Runs (or "execute") one command at a time.
Program statement
Program
Sequential Programming
Event Driven Programming
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.
Input
Output
Program Statement
User Interface
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.
Input
Output
Program
User Interface
The inputs and outputs that allow a user to interact with a piece of software. Can include a variety of forms such as buttons, menus, images, text, and graphics.
User Interface
Expression
Procedure
Program specification
Program statements run in order, from top to bottom.
Program requirements
Program specification
Sequential programming
Event Driven Programming
Some program statement run when triggered by an event, like a mouse click or a key press.
Program statement
Program
Event Driven Programming
Program specification
A written description of how a command or piece of code works or was developed.
Documentation
Program Requirements
Program specification
Development process
Form of program documentation written into the program to be read by people and which do not affect how program runs.
Comment
Documentation
Event
Program specification
A collaborative programming style in which two programmers switch between the roles of writing code and tracking or planning high level progress.
Pair Programming
Development Process
Plagiarism
Program Requirements
Finding and fixing problems in an algorithm or program.
Debugging
Syntax Error
Iterative Development Process
Incremental Development Process
The steps of phases used to create a piece of software. Typical phases include investigating, designing, prototyping, and testing.
Development process
Incremental Development Process
Iterative Development Process
Program specification
Associated with an action and supplies input data to a program. Can be generated when a key is pressed, a mouse is clicked, a program is started, or by any other defined action that affects the flow of execution.
Event
Program Requirement
Event Driven Programming
Program
A design approach that breaks the problem into smaller pieces and makes sure each piece works before adding it to the whole.
Incremental Development Process
Iterative Development Process
Development process
Program
A design approach requires refinement and revision based on feedback, testing, or reflection throughout the process. This may require revisiting earlier phases of the process.
Incremental Development Process
Iterative Development Process
Development process
Pair Programming
What does the following evaluate to?
!true
true
false
false!
!false
This type of variable is temporary and can only be used where it was created.
local
global
var
universal
What will output to the console?
25
50
75
100
125
What does the following evaluate to?
true || false
true
false
not enough information
true && false
What will output to the console?
"C"
"hug"
"D"
"hawks"
What will output to the console?
"Hi!"
"Bye!"
"Hello!"
"Hola!"
What will output to the console?
"hug"
4
100
112
On which line is a function being called?
(a)
What does the following evaluate to?
true && false
true
false
not enough information
true && false
On which line is a function being declared/defined?
(a)
What does this return?
7%5
2
3
5
7
What's the fancy word we use to combine Strings with other Strings, numbers, or other variables?
(a)
What will output to the console?
"A"
"a"
"B"
"b"
What will output to the console?
"apple"
"grape"
"Apple"
"Grape"
Which line will likely cause the program to not run correctly?
line 1
line 3
line 4
line 5
What will output to the console log?
"hawks"
19
"hug"
35
A variable is a name reference that can store one value at a time.
true
false
What will output to the console?
"Hi!"
"Bye!"
"Hola!"
"Hello!"
What does the following evaluate to?
false|| false
true
false
not enough information
true && false
In which order will the output appear?
"five" "six" "seven" "five" "six"
"seven" "five" "six" "five" "five"
"five" "six" "five" "six" "seven"
"seven" "five" "six" "five" "six"
This is a block of organized, reusable code thatis used to perform a single, related action. Examples include print(),str(), sqrt().
Lists
Parameters
Functions
Modules
A placeholder for a piece of information that can change.
Expression
Event
Statement
Variable
The equality operator (sometimes read: "equal equal") is used to compare two values, and returns a Boolean (true/false). Avoid confusion with the assignment operator "=",
>=
=<
==
+=
A variable that can be used and updated by any part of the code. Its scope is typically derived from the variable being declared (created) outside of any function, object, or method.
Expanded Variable
Local Variable
Expressive Variable
Global Variable
The common programming structure that implements "conditional statements".
If-Statement
Else-Statements
Local-Satement
Function-Statement
A variable with local scope is one that can only be seen, used and updated by code within the same scope. Typically this means the variable was declared (created) inside a function -- includes function parameter variables.
Local Variable
Global Variable
Scope Variable
Expanded Variable
To link together or join. Typically used when joining together text Strings in programming.
Fusing
Locking
Concatenate
Adding
in JavaScript an event triggered by pressing or releasing a key on the keyboard.
Key Trigger
Key Loop
Key Condition
Key Event
Any sequence of characters between quotation marks.
Integer
Word
Char
Sting
Statements that only run under certain conditions.
Expressions
Conditionals
Statements
Variables
A single value of either TRUE or FALSE.
Boolean
Binary
Conditional
Statement
In programming, an expression that evaluates to True or False.
Boolean Expression
Binary Expression
Conditional Expression
Statement Expression
Which of the following images shows the path and ending location of the robot that will result from executing the code above. The starting location of the robot is shown as dotted triangle for cases where the robot does not start and end at the same location.
REPEAT 4 TIMES {
MOVE_FORWARD()
MOVE_FORWARD()
MOVE_FORWARD()
ROTATE_RIGHT(90)
MOVE_FORWARD()
ROTATE_RIGHT(90)
MOVE_FORWARD()
ROTATE_RIGHT(90)
}
Which of the following is NOT true about functions in programming?
Functions are reusable programming abstractions.
Functions help reduce the complexity of writing and maintaining programs.
Functions cannot make calls to other functions within the same program.
Once defined, a function can be called many times from different parts of a program.
Functions help break a problem into logical chunks.
What is the most likely outcome of running the code shown at right?
It will draw a star with each side 150 pixels long.
The program will stop with an error at line 3 because parameters may not be used in for loops.
The program will stop with an error at line 5 because it is dividing by 0.
The program will run without error, but will not draw anything.
Which of the following images represents the most likely output produced by the code segment given below?
Look at the code. The dots are only appearing on the right side of the screen. What number should I change so the dots draw across the entire bottom?
250
330
340
450
