Font size
WorksheetsAP CSP Units 1-5 Review
Total questions: 35
Worksheet time: 30mins
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.
Which of the following are true about how analog data is converted to digital data?
The digital version is a representation of the analog, but cannot contain all of the details.
To make the digital version be a more accurate representation of the analog data, the process should use fewer bits to represent each sample.
A longer interval between measured samples means more details will be captured in the conversion from analog to digital.
The digital version contains all of the details of the analog data, as long as enough storage capacity is available.
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
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.
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.
A collection of interlinked web pages on the World Wide Web
Heading
Website
Digital Footprint
HTML
Hypertext Markup Language, a language used to create web pages
Website Content
Website Structure
Heading
HTML
The collection of information about an individual across multiple websites on the internet
HTML Element
Website Content
Digital Footprint
HTML Tag
The inputs and outputs that allow a user to interact with a piece of software.
Useful Interchange
User Input
User Interface
User Intention
Data that are sent to a computer for processing by a program.
Output
Screen
Input
User Interface
Any data that are sent from a program to a device.
Input
Output
Outdate
Program
What will the console log say when this program is run?
"Starting my program!"
"You clicked the button!"
"Ending my program!"
"Starting my program!"
"Ending my program!"
"You clicked the button!"
"You clicked the button!"
"Starting my program!"
"Ending my program!"
"You clicked the button!"
"Ending my program!"
"Starting my program!"
After the program is run, what will the text color of smallButton be?
red
blue
green
yellow
If the user clicks the button, what color will "topButton" be when the program finishes running?
red
green
blue
orange
When this program is run, the user clicks "topButton" then "bottomButton" and then "topButton" again. What will be displayed in the console?
aaa
bbb
ccc
aaa
aaa
ccc
bbb
aaa
ccc
aaa
bbb
aaa
aaa
bbb
aaa
ccc
What is output by line 6?
(a)
What is output by line 5?
(a)
What is output by the program?
less than 10
less than 20
less than 30
30 or more
What is output by the program?
Option A
Option B
Option C
Option D
Option E
What will the value of bags be at the end of the program?
(a)
What are operators?
numbers, strings, or booleans
combination of operators and values that evaluate to a single value
fancy name for addition, subtraction, multiplication, and division
portion of the code and program that can hold a value
What is a mod?
refers to the remainder
combination of operators and values that evaluate to a single value
fancy name for addition, subtraction, multiplication, and division
portion of the code and program that can hold a value
Match the following.
&&
AND
| |
OR
!
NOT
Thinking about truth tables, what does this set of logical operators evaluate to?
TRUE && FALSE
True
False
Thinking about truth tables, what does this set of logical operators evaluate to?
TRUE | | FALSE
True
False
Thinking about truth tables, what does this set of logical operators evaluate to?
! TRUE
True
False
What is the value of 12 % 6?
2
0
3
1
What type of variable is this?
Not a variable
variable with concatenation
variable with counter pattern
variable string
Once this code is run, what is the value of tickets?
68
103
35
33
What will be displayed after this code is run?
You Lose!
Perfect Game!
You Win!
To attend a particular camp, a student must be either at least 13 years old or in grade 9 or higher,
but must not yet be 18 years old.
Let age represent a student’s age and let grade represent the student’s grade level.
Which of the following expressions evaluates to true if the student is eligible to attend the camp and evaluates to false otherwise?
((age ≥ 13) OR (grade ≥ 9)) AND (age ≤ 18)
((age ≥ 13) OR (grade ≥ 9)) AND (age < 18)
((age ≥ 13) OR (grade ≥ 9)) OR (age ≤ 18)
((age ≥ 13) OR (grade ≥ 9)) OR (age < 18)
Match the following
15 % 3
0
5 % 3
2
16 % 3
1
13 % 8
5
