stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Jesse Taffere APCSP Exam Review Flashcards | StudBud
Explore
/
Jesse Taffere APCSP Exam Review
Jesse Taffere APCSP Exam Review
99 terms
·
StudBud Administration
Imported from external platform
Flashcards
99 cards
F
Practice quiz
P
Host live
L
Questions
99
Answers
1
What will be the value of x after this code runs?
55
27
137
82
2
Which of these is the best explanation of pseudocode?
(Used on the AP CSP AP Exam)
A standard programming language that is understood by all computers.
Pseudocode is the language that runs the fastest on computers.
Pseudocode is a programming language that looks just like natural human lan
Pseudocode is a language that represents concepts, but can't actually run.
3
What is a microprocessor?
an integrated circuit having all the functionality of a central processing
Another word for IDE
CPU
Circuits that work within the computer
4
If the store calls the procedure on a list of 5 products, approximately how long will it take the algorithm to complete?
10 minutes
20 minutes
5 minutes
2 minutes
5
Which of the following is a single byte of digital information?
01010001
0
1
6
When it comes to image type, computers can more easily compress:
Digital Clip Art
Photos
7
Which of these correctly expresses that algorithm in pseudocode?
n ← 1 | REPEAT 10 TIMES { result ← n*n | DISPLAY(n) | n ← n+2 }
n ← 1 | REPEAT 10 TIMES { result ← n*2 | DISPLAY(result) | n ← n+2 }
n ← 1 | REPEAT 10 TIMES { result ← n*n | DISPLAY(result) | n ← n+2 }
n ← 1 | REPEAT 10 TIMES { result ← n*n | DISPLAY(result) | n ← 2 }
8
What is the best explanation for why digital data is represented in computers in binary?
Impossible to build a machine that uses anything else
The binary number system is the only system flexible enough.
Consequence of history: pioneers used it for secret codes
Easier and more reliable to distinguish between 2 states
9
Which of the following will
call
the function drawFish?
drawFish( );
function drawFish( );
drawFish;
drawfish( );
10
Based on the table, we can say the run time for this algorithm is in polynomial time and is reasonable.
True
False
11
What is a programming language?
Grammar rules including instructions given to a computer
Specific instructions given to a computer
None of these
A line of code
12
A binary message was supposed to be ABAB, but was sent at twice the rate. What is received?
ABAB
AABB
BBBB
ABBB
13
How many more numbers can be represented when increasing bits by 1
6x
8x
4x
2x
14
What is one important naming convention of functions?
Name should be descriptive to know what function does
2 functions w/ same behavior should be given identical names
Name should indicate how long the function takes to run
Function names should be organized alphabetically
15
Compression in which every bit of the original data can be recovered from the compressed file.
Lossless Compression
Lossy Compression
Lossless Transformation
Heuristic Compression
16
Which of these expressions are logically equivalent to:
NOT ( score > 7 OR minutes > 20 )
NOT ( score > 7 AND minutes > 20 )
score > 7 AND minutes > 20
score ≤ 7 OR minutes ≤ 20
score ≤ 7 AND minutes ≤ 20
17
A set of rules governing the exchange or transmission of data between devices
Instructions
Protocol
Internet
Directions
18
What is true about the process of converting analog data into digital data?
With enough space, digital data can exactly match analog data
The digital data cannot contain as much detail as the original analog data
In short sampled intervals, more detail will be lost from analog to digital
With fewer representative bits, better analog data can be displayed
19
An algorithm that uses a heuristic will come up with the
optimal
solution more quickly than an algorithm that does not.
True
False
20
Which algorithm's runtime is most likely to be improved by the use of a heuristic?
Suggesting the grocery store that is the closest distance to the user
Calculating fast route for grocery delivery driver to different customers
Sorting grocery options from lowest price to highest price for a shopper
Calculating the final cost of the groceries plus tip and delivery fee
21
What is the speedup of the parallel solution?
15
5
60
1/5
22
Karla discovers this photo of a dog on a social media account. Is she allowed to use this photo on her website?
Only if it is explicitly stated to be licensed for re-use.
If there is no explicit license declared next to the photo, then yes.
Only if it's explicitly stated to be in the public domain.
As long as she provides attribution, such as a link.
23
A program storing values in 7 bit integers can store the number 117.
True
False
24
The main difference between
low-level
and
high-level
programming languages is
low-level languages are easier for humans to understand
high-level languages must be translated by software programs
low-level languages cannot be understood by computers.
high-level languages are more complex
25
Which of these is a good argument for expressing the algorithm in Python on the blog?
Python runs on any computer that has a Python interpreter,others can try it
All computers come with built-in support for Python, so the code will run
Only Python code can express algorithms on social media data
Python code can be understood by anyone reading the article
26
Which is true?
This program contains ONE statement
Each DISPLAY expects a single statement
This program contains 2 statements
Each statement calls a procedure named DISPLAY
27
What is an array?
An example of an IDE
None of these
A place where code is stored
a container which holds the fixed number of similar data types
28
The full, original file can be obtained from a file after being compressed with lossy compression.
False
True
29
Measuring data less often (longer intervals) is a better digital representation of analog data.
False
True
30
Convert the decimal number 73 to binary.
100010
10000
0110100
1001001
31
What is the 4-bit binary number for the decimal number nine?
0110
1010
1001
1100
32
What is the minimum number of bits needed to encode 26 letters of the alphabet plus 10 digits?
5
4
3
6
33
Compute: 15 MOD 4
5
3
2
4
34
TSCII uses one byte to encode each character. How many are in the following binary?
11111110110001001100010110111010
1
3
4
2
35
What is the original English word represented by this encoding:
0101100111110101111000110
redraw
reward
drawer
None of the above
36
What is machine learning?
System that can learn through self improvement and trial and error
Education system ran by AI
An instructional device that teaches
All of these
37
What are the implications of this problem being undecidable?
Problem is not solvable in any cases.
Problem may be solvable in some cases, but no algorithm solves all cases.
Problem is solvable, but will take an unreasonable amount of time.
Problem can be solved easier with a heuristic to approximate a solution.
38
A program storing values in 8 bit integers can store the number 378.
True
False
39
What type of compression throws away "useless" information to compress a file?
Lossless Compression
Heuristic Compressoin
Lossless Transformation
Lossy Compression
40
How many string variables is this code storing?
None
1
3
2
41
Which of the following types of technology uses beams of light to transmit bits?
Copper Wire
Sound Waves
WiFi
Fiber Optic Cable
42
What structure must be added to the original algorithm so that it can compute the calories for multiple dogs?
None of the Above
Selection
Iteration
Sequencing
43
Select the answer that lists the units of bytes in ascending order (from smallest to largest)
exabyte, gigabyte, megabyte
megabyte, terabyte, exabyte
kilobyte, petabyte, gigabyte
gigabyte, megabyte, terabyte
44
An extra piece of information that goes through a function to customize it for a specific need
Algorithm
Function
Loop
Parameter
45
the Internet's system for converting alphabetic domain names into numeric IP addresses.
TCP
IP
DNS
HTTP
46
What is a computer system?
Line of code that doesn't function as intended
combination of memory, CPU, peripheral devices that are connected to it
None of the above
combination of computer systems
47
Can the run time of the 60-min playlist feature be improved?
Yes, they can reduce the run time by rewriting the feature in fewer lines
No, combinatorial problems like this are considered undecidable
No, combinatorially hard problems always require superpolynomial time
They can speed up run time using a heuristic for sub-optimal playlist
48
57 in hexadecimal is equal to __ in decimal
77
87
84
82
49
If each pixel color in an image is encoded with 12 bits, what would be the hex value for blue?
0F0
F00
F0F
00F
50
11010 in binary is _____ in decimal
24
28
30
26
51
How many bits are in 2 bytes?
2 bits
8 bits
16 bits
32 bits
52
After the code runs, what is displayed? (Hint: Spaces...)
> _ <
<_>
_><
>_<
53
A number assigned to any item that is connected to the Internet
IP Address
DNS
TCP
Packet
54
What decimal value do you get when you add binary 1 to binary 11111111?
0
256
2
255
55
What will happen if you type pseudocode in another language's programming environment and try to run the program?
It will run, but less efficiently as it is less commonly used.
It simply will not work.
The program will run, because all programming environments understand it.
56
How many bytes long is this sequence of bits:
11000011
2
4
1
3
57
An algorithm is
Something with algebra
a series of events that produces result
a math equation
a series of control structures
58
After the code runs, what is displayed?
O - :
:
: - O
O
59
Loop or Function: Writing out the word "GOODBYE"
Loop
Function
60
After running that code, what will be displayed?
7 9 6
playfulness cuddliness hunger
It will result in an error
6 9 7
61
Which line of code successfully calculates and stores the number of extra truffles?
numExtras ← numChocolates / numPeople
numExtras ← numChocolates - numPeople
numExtras ← numChocolates MOD numPeople
numExtras ← numPeople - (numChocolates MOD numPeople)
62
What is true about this binary data?
This sequence could represent letters and emojis, but not numbers.
This sequence could represent numbers, letters, or emojis.
This sequence can only store letters.
Binary data can only store numbers.
63
Which types of data are stored on a computer using bits?
1 & 2
1, 2, & 3
Only 2
Only 1
64
Which change will reduce the most number of operations while still outputting a correct answer?
Removing the updating of ind entirely
Moving the return statement inside the conditional (after PercentGreater)
Moving the calc of percentGreater after the loop (but before the return)
Moving calc of percentGreater after conditional (but before ind)
65
Provides reliable, ordered, and error-checked delivery of a stream of packets on the internet
IP Address
HTTP
TCP
DNS
66
A photographer wants to lighten a dark image. What should he do in order to lighten the image?
Decrease the RGB values
Increase the amount of pixels
Increase the RGB values
Decrease the amount of pixels
67
What's a good use case for using a lower quality setting on photos?
Saving a photo of a textbook for easy reading offline.
Saving a photo of a multi-line bar graph with small text labels.
Saving a thumbnail that will link to a full-sized version
Saving photos that you want to print out and frame.
68
Which of the following would likely be the hardest to compress?
The lyrics to all of the songs by The Beatles
A document of randomly generated letters
The Declaration of Independence
A book of nursery rhymes for children
69
What is the name of the character encoding scheme upon which most modern schemes are based?
ASCII
Binary
UTF-8
Unicode
70
Arrange the binary numbers from smallest to largest.
0001000100010001, 0010011100100111, 0001010100010101, 01001000
0001010100010101, 0001000100010001, 0010011100100111, 01001000
0001000100010001, 0001010100010101, 0100100001001000, 00100111
0001000100010001, 0001010100010101, 0010011100100111, 01001000
71
What's the least number of bits that you'd need to represent (0-59) in binary?
4
5
3
6
72
What is the sum of hunger + playfulness?
13
7
15
6
73
What is the most popular OS?
Android
MAC
Linux
Windows
74
What's the largest number that can be represented in 4 bits?
12
15
16
5
75
In this case, what does a speedup of 3 indicate?
The program completed in 1/3 of the time with 6 computers
The program completed in 3 minutes more time with the 6 computers
The program completed in 3 minutes less time with 6 computers versus one
The program took 3 times as long to complete with 6 computers
76
The following variable stores a number value: artist ← "Simon & Garfunkel"
False
True
77
Which of the following most accurately describes Moore's Law:
Relationship of boolean logic statements involving AND/OR
Modern cryptography is a "computationally hard" problem
The observation that computing power doubles every two years
One should assume that traffic on the Internet is insecure
78
If we set x to 32 and y to 8, what value will the mystery variable store after running this code?
24
1/4
40
-24
79
How many bytes is a megabyte?
100
100,000
1,000
1,000,000
80
Your algorithm counts the number of words in an essay. Now it must ignore words like "the" and "to". What would you use?
Sequencing
None of the above
Selection
Iteration
81
The following variable stores a string: title ← "I am a rock"
True
False
82
"D" in hexadecimal is equal to __ in decimal
12
13
11
10
83
What is the value of the variable cuddliness?
"hunger"
9
7
"playfulness"
84
Which of the following protocols are considered lower level protocols of the internet
TCP/DNS
IP/HTTP
TCP/IP
DNS/HTTP
85
Evaluate the expression: hunger + 2(playfulness)
16
17
20
13
86
Is this analogous to parallel computing?
False
True
87
What does this chart demonstrate about the benefits of distributed computing?
Distributed computing utilizes all the power of a computer's processors
Distributed computing can reduce the time it takes to solve large problems
Distributed computing can solve large problems quickly by using heuristics
Distributed computing increases storage space available to solve problems
88
A program stores the number of views in a 32-bit integer. However, it cannot display numbers above 2,147,483,647. Why?
Integer Overflow Error
Limited precision of floating-point numbers
Rounding error
89
According to CP1124, what is the binary encoding of the Ukrainian word "вже"?
1101 0010
1101 0010 1101 0110 1101 0101
1111 0100 1010 0001
90
If mouseX is 173 and mouseY is 271, what will be the value of currentSquare?
4
1
2
3
91
Convert
11110
to binary.
26
14
13
30
92
Which of these data sources is analog?
The number of players sitting on the bench during a basketball game
A list of teams competing in a lacrosse tournament
The final scores of ten basketball games
A swimmer's position in the pool as they swim from one end to the other
93
Which choice puts a space after each byte:
010101011101001011000000
01 01 01 01 11 01 00 10 11 00 00 00
01010101 11010010 11000000
010101011101 001011000000
0101 0101 1101 0010 1100 0000
94
What would be displayed as a result of executing this flowchart algorithm?
0
4 3 2 1
15
10
95
A programming construct that repeats a group of commands
Algorithm
Parameter
Loop
Function
96
"Data about the data" is knows as...
predata
superdata
megadata
metadata
97
What does TCP stand for?
Tedious Control Protocol
Transmission Control Protocol
Tranfusion Control Protocol
Transfer Control Protocol
98
Which of the following would likely be the easiest to compress?
A black and white icon of a unicorn
A photo of a painting of unicorn
A colored photo of a unicorn
A colored cartoon of a unicorn
99
Following the algorithm below, how would you transform the word "avocado"?
abavobocabadobo
abvobcabdob
avabocabadabo
abavbvobocbcabadbdobo