NEW
Font size
WorksheetsAP Computer Science Principles Units 1-3
Total questions: 30
Worksheet time: 17mins
What is the best explanation for why digital data is represented in computers in binary?
The binary number system is the only system flexible enough to allow for representing data other than numbers.
It's easier, cheaper, and more reliable to build machines and devices that only have to distinguish between binary states.
It typically takes fewer digits to represent a number in binary when compared to other number systems (for example, the decimal number system)
It's impossible to build a computing machine that uses anything but binary to represent numbers
What is the 4-bit binary number for the decimal number Ten (10)?
0010
1010
0110
0101
What is the minimum number of bits you would need to encode the 26 letters of the alphabet plus a space - a total of 27 characters?
2 Bits
3 Bits
5 Bits
6 Bits
Number systems with different bases such as binary (base-2) and decimal (base-10) are all used to view and represent digital data.
Which of the following is NOT true about representing digital data?
At one of the lowest levels of abstraction, all digital data can be represented in binary using only combinations of the digits zero and one.
The same value (number) can have a different representation depending on the number system used to represent it.
Groups of bits can be used to represent abstractions, including but not limited to numbers and characters.
Some large numbers cannot be represented in binary and can only be represented in decimal.
Consider the following three binary numbers:
01010 010000 1110
Which of the following lists the numbers in order from least to greatest?
010000, 1110, 01010
01010, 1110, 010000
01010, 010000, 1110
1110, 01010, 010000
A middle school is expanding to open a high school next year, doubling the total number of students. The school keeps a database in which each student's unique ID number is stored as an 8 bit number called studentID. Before the arrival of the new students almost every 8 bit number has already been assigned to a student. Of the options provided below, which is the smallest change to the way studentID is represented necessary to ensure each incoming student receives a unique ID?
Add a bit to studentID to double the number of IDs that the database can represent.
Double the number of bits in studentID to double the number of IDs that the database can represent
Keep using an 8-bit number for studentID but reserve the first bit to indicate middle school or high school.
Remove a bit from studentID to make room for incoming students
Which of the following is true about the way digital data is transmitted on the Internet?
Bit-rate (bandwidth) is the time elapsed between the transmission and receipt of a piece of digital data.
Latency is the amount of data (measured in bits) that can be sent in a fixed amount of time.
Digital data can only be transmitted between two devices when they are physically connected to one another (for example by a copper wire)
Two devices must communicate using the same bit-rate to successfully send and receive digital data.
8 bits is enough to represent 256 different numbers. How many total bits do you need to represent 512 (twice as many) numbers?
9 Bits
10 Bits
16 Bits
17 Bits
What value does the above code segment display?
17
36
53
No value is ever displayed because the algorithm repeats the REPEAT UNTIL block indefinitely.
The above procedure check is called in a program after each time a True or False question is answered. If the user types in True True False True as their answers for four questions on a quiz, what should their overall score be?
25%
50%
75%
100%
A part of the program that does not work correctly.
Bug
Break
Loop
Variable
What does run mean?
to make a code for a program
to make a program complete an algorithm
to make a website show up on your screen
to make loops never stop
Trying again and again, even when something is very hard.
persistence
algorithm
computational thinking
loop
Using the powers of computers to solve problems.
computer science
computational thinking
for loop
command
What is a list of steps that you can follow to finish a task?
Code
Program
Algorithm
A large office building has an elevator that carries occupants between any of the building's 10 floors. The basement is referred to as "Level 0" while the topmost floor is "Level 9." The software for the elevator uses a variable, called level, to track the floor number of the elevator's current position. When a person presses a button requesting the elevator to rise to a higher floor, the above code is executed.
What is displayed if the elevator is currently on the 7th floor (level = 7) and the person on the elevator presses a button that says to go up 3 floors (floors = 3)?
Level 7 Level 8 Level 9
Level 8 Level 9 Cannot go up. Level 9
Level 8 Level 9 Level 10
Cannot go up.
Any programming language that lets users create programs by manipulating “blocks” or graphical programming elements, rather than writing code using text.
Command
Run Program
Algorithm
Block-based programming language
A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
Debugging
Event
Algorithm
Run Program
The language that programmers create and use to tell a computer what to do
Code
Command
Run Program
BINARY
ASCII
American Information and Standard Codes
Standard Code for Information Interchange.
American Standard Code for Information Interchange.
An action that causes something to happen
ASCII
Event
BINARY
Bit
What will be printed to the console by this code?
"B", "C", "D"
"A", "B", "C", "D"
"A", "B", "C"
"A", "C", "D"
How many times will "Hi" be printed to the console?
1
2
3
What will the value of x be AFTER this code is run?
4
2
3
6
What will be printed to the console when this code is run, if the user enters 12?
"Jan"
"Jan", "Feb", "Mar"
"Jan", "Mar"
"Feb", "Mar"
What will be printed to the console when this code is run?
"Hi"
"Bye"
What will be printed to the console when this code is run?
"Yay!", "Boo", "Yippee"
"Yay!", "Yippee"
"Boo", "Yippee"
"Yippee"
What will be printed to the console when this code is run?
"Yay!", "Boo", "Yippee"
"Yay!", "Yippee"
"Boo", "Yippee"
"Yippee"
What will the value of the variable z be AFTER this code has run?
10
5
-20
-30
What will be printed to the console when the following code is run?
12, 8, "b"
"a", "b", "b"
"a", 8, 8
12, "b", 8
