stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Shih, Avery AP Exam Review Flashcards | StudBud
Explore
/
Shih, Avery AP Exam Review
Shih, Avery AP Exam Review
92 terms
·
StudBud Administration
Practice Questions for the AP Computer Science Principles Test
Flashcards
92 cards
F
Practice quiz
P
Host live
L
Questions
92
Answers
1
What would be the binary representation of the decimal number 44?
001100
101100
011110
100011
2
Which of the following is
LEAST
likely to be included with the game?
Information about what types of mobile devices can be used
Location of high-crime areas that should be avoided
Location of highly trafficked roads and bridges
What protocols the mobile device uses to connect to the internet
3
What is the minimum number of bits needed to store a single pixel of a photo from 0 to 255?
512
24
256
8
4
Which of the following is true about redundancy on the internet?
I, II, and III
II and III only
I only
I and II only
5
The procedure isFound(list, item) returns TRUE if an item is found in a list What will the following procedure display?
[4, 6, −4]
[1, 6, −4]
[ ]
[1, 35, 6, 76, 4, 98, 5, 1, 8, 96, −4]
6
Which of the following could NOT be answered by analyzing only information in the student data set?
The number of students accepted to a college
The average GPA for a college
The college with the most interest from a high school
The number of students interested in a college major
7
Which of the following is a cause of the digital divide?
Lack of access to technology due to location
Lack of knowledge on how to use technology
All of the above
Lack of access to the technology due to affordability
8
Which of the following is true about data compression?
Can be used to reduce the size of a file for storage or transmission.
Data compression can be used for pictures and video only.
Lossless data compression is the best compression under all conditions.
Lossy compression cannot be used when sending pictures.
9
What is the percentage that this algorithm displays true?DISPLAY(RANDOM(5, 9) > 9)
0%
100%
20%
60%
10
Which algorithm calculates average correctly?
Neither Algorithm A nor Algorithm B calculates average correctly.
Both Algorithms calculate average correctly, but Algorithm A more efficient
Algorithm A calculates average in all cases, while Algorithm B does not
Algorithm B calculates average in all cases, while Algorithm A does not.
11
Which of the following test cases will return the correct average using the above procedure?
numbers[11, 35, 6]
numbers[1, 1, 35, 6]
numbers[3, 5, 11, 6]
numbers[0, 1, 35, 6]
12
What are two aspects of efficiency?
memory usage and length of code
wall clock time and CPU time
execution time and memory usage
execution time and length of code
13
Which of the following best approximates the minimum possible time to run all three processes in series?
28 s
15 s
9 s
4 s
14
What is the percentage that this algorithm displays true?DISPLAY(RANDOM(1, 10) ≤ 6)
60%
9%
10%
100%
15
Answer the question
II and III
I only
II only
I , II , and III
16
What should replace so the program below displays TRUE 60% of the time?
x MOD 2 = 0
x MOD 5 = 0
x MOD 5 = 5
x MOD 2 = 1
17
Which of the following input data is needed by the upgraded game that was
NOT
needed by the original game?
GPS location
Picture of the player
Event sensing; an event would be the user pushing a button or screen
Age of the player
18
What is the following program returning?
27
25
20
37
19
Which of the following is NOT metadata for the picture?
The memory space taken up by the picture
The picture of the dog
The location where the picture was taken
The time the picture was taken
20
What is displayed because of executing the code segment?
9
1 5 7
3 9
1 3 5 7 9
21
An algorithm has
n
number of steps. Which of the following would be considered a reasonable number of steps?
n!
4^n+8n^2
100n^4
3^n
22
The following program is intended to display the string 789. What type of error will the following procedure cause?
Runtime error
Syntax error
No error
Logic error
23
True when the first element is equal to the last element of the array is equal to the last element of the array?
( list1[0] = list1[1] )
( list1 = list1 )
( list1[1] = list1[LENGTH(list1)] )
( list1[0] = list1[LENGTH(list1) – 1] )
24
Which of the following types of components is necessary for cybersecurity?
ALL
Software
Hardware
Human
25
What is the percentage that this algorithm displays true?DISPLAY(RANDOM(1, 10) = 6)
10%
60%
100%
0%
26
How many lines need to be cut to completely isolate computer E from computer C?
0
8
3
6
27
What will the following program display?
OXXOO
OXXOXXOXX
The program is an infinite loop.
OOOXX
28
What will be the result of the displayed program?
14 6
6 14
7 5 9
9 5 7
29
What is the percentage that this algorithm displays true?DISPLAY(RANDOM(1, 5) = 5 OR RANDOM(1, 5) = 9)
60%
100%
40%
20%
30
What is the maximum number of searches required if using a linear search on list containing 2,000 numbers?
11
1
1000
2000
31
Which of the following code segments will display the correct letter grade for a given score?
I only
I, II, and III
I and II only
III only
32
What binary number is equal to 10001BIN+3DEC?
10100BIN
11100BIN
11110BIN
10011BIN
33
What is the specific order in which instructions are performed in an algorithm?
sequencing
iteration
abstraction
selection
34
What is displayed after running the algorithm below?
12
43
133
145
35
What percentage of the time will the program display an even number?
20%
10%
50%
40%
36
Which of these lists correctly orders the binary numbers from smallest to largest?
00110011, 011001100110, 010101010101, 10101010
10101010, 011001100110, 010101010101, 00110011
10101010, 010101010101, 011001100110, 00110011
00110011, 010101010101, 011001100110, 10101010
37
Consider the following code segment. What will the executed code display?
All even numbers between 1 and 12
All even numbers between 3 and 12
All odd numbers between 3 and 12
All odd numbers between 1 and 12
38
What is the minimum number of binary digits needed to store the number 56?
3
1
5
6
39
Which of the following is
NOT
metadata?
The Red, Green, and Blue values of the top left pixel
The filename
The geographic location where the picture was taken
The date the photo was taken
40
Which command can replace <Missing Condition> to result in the last column of the table shown below?
b AND (a AND b)
NOT (a AND b)
a AND (a AND b)
a OR b
41
Which of the following is likely to affect the ability of the program to process larger data sets?
How many program statements the program contains
The order in which the data is put into the data set
How well the program is documented
How much memory the program requires to run
42
What will the following code segment display?
11
3
6
Nothing will be displayed due to an error.
43
What is a programming construct where a section of code is run only if a condition is met?
selection
sequencing
iteration
abstraction
44
Which of the following lists is
NOT
a candidate for a binary search?
A list of students in order of height
A list of words in a dictionary
A list of numbers from smallest to largest
A list of words from a poem about sun in the order they appear in the poem
45
The Caesar cipher is an example of what type of encryption?
No key encryption
Home key encryption
Public key encryption
Symmetric encryption
46
What is displayed by running the code segment?
3 11 3
3 3 6
8 4 6
11 3 8
47
Which of the following is a uniquely useful feature of search engines?
The ability to find basic information such as creators or release dates
The ability to find and filter information from a large variety of sites
The ability to find information originally released in print form
The ability to distinguish between different versions of something
48
When running the program, the first element is counted twice, resulting in incorrect total. What type of error below?
Logical error
Runtime error
No error. The program works as intended.
Syntax error
49
Which of the following illustrate ways that the internet facilitates collaboration
I and III only
II and III only
I, II, and III
I only
50
Which of the following test cases will NOT find the maximum number in the list?
list1[23, 67, 3]
list1[4]
list1[−23, −67, −3, −7]
list1[0, 0, 0, 0]
51
What will the following code segment display?
10
22
30
1
52
What is displayed as a result of executing the code segment?
Dog Cat Fish Golden Bandicoot
Golden Bandicoot Cat Fish
Dog Cat Fish
Dog Golden Bandicoot Cat Fish
53
What is a compression technique that does not lose any data in the compression process?
data compression
Creative Commons
lossy data compression
lossless data compression
54
Which of the following is a negative trade-off inherent in lossless compression?
The image quality will be less and will result in a blurry image.
The number and size of pixels will be less.
Some of the data will be lost and cannot be recovered.
The file can be difficult to email and can take up lots of memory storage.
55
What will the following code segment display?
3
Nothing will be displayed due to an error.
6
11
56
What is a sequence of instructions or code being repeated until a specific end result is achieved?
iteration
selection
abstraction
sequencing
57
Which of the following statements is
NOT
correct:
Binary data is processed by physical layers of computing hardware.
Logic gates are used to perform operations such as addition and subtraction
Logic gates are modeled by Boolean functions.
Hardware is the lowest level of abstraction.
58
What is the code below displaying?
2, 4, 6, 8, 10, 12, 14
3, 6, 9, 12, 15
Nothing will be displayed
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
59
In what order will the numbers appear after running the algorithm below?
5, 7, −6, 7
5, 7, 4, 3.5
5, 6, −5, 6
5, 6, 3, 3
60
What is the minimum number of lines that must be cut to isolate F completely?
6
0
4
8
61
Which of the following is considered a potential effect of the mobile game rather than the purpose of the game?
Players are becoming more cultured by visiting artworks.
People are exercising.
People are not watching where they are walking and are getting injured.
Players play the game in their spare time.
62
What will the following code segment display?
1 4 7 10 9
10
9 10 7 4 1
Nothing will be displayed due to the error index out of bounds.
63
Large data sets find patterns that can predict future usage. Which of the following is used to predict future usage?
Identifying the time at which most purchases are made
Idnetifying the largest spending address
Calculating the monthly bill charged
Using past purchases to recommend products for possible purchase
64
What will the above program display?
4 8 8
3 8 0
Nothing due to an infinite loop
2 8 14
65
We can convert a number from decimal to octal (base 8) by repeatedly subtracting the largest possible powers of what?
7
9
2
8
66
Which of the following is NOT an example of using citizen science as a possible solution?
The behavior of fireflies during the summer months
Calculating PSAT scores for a school district
The behavior of the mysterious jellyfish on the beach or water
Collecting recordings using ultrasonic microphones and sonograms of bats
67
Which of the following is an example of metadata that serves to be descriptive of the content of a file?
User-selected tags (e.g., "Vacation", Personal Work")
Date Created
File Size
Program used to read the file
68
What should replace <missing condition> so that the program below displays TRUE 60% of the time?
x < 6
x > 10
x >= 9
x >= 6
69
Which of the choices below properly identify these concepts?
Lexicographic and Asymmetric
Asymmetric and Symmetric
Symmetric and Steganography
Hash Codes and Key Transfers
70
In the following flowchart, what is the value of RESULT?
True when either A or B are true
Always false
Always true
True when both A and B are true
71
Which of the following does NOT need to be considered when determining the credibility of a source?
Author’s reputation and credentials
Publisher’s reputation and credentials
Use of persuasive techniques within the source
Sponsorship of the article or publisher
72
What should replace <missing condition> so that the program below display TRUE 10% of the time?
x < 9
x < 1
x <= 9
x <= 1
73
Which best describes the role of TCP?
The foundation of data communication for the World Wide Web
Setting the rules for a numerical label assigned to each device connected
The set of rules for the path packets taken on the fault-tolerant internet
A protocol for encrypting and decrypting data transferring on the internet
74
Which of the following could NOT be a potential response for a server using IPv4?
174.260.45.144
54.116.188.246
92.11.198.113
128.198.232.65
75
Using the partial hierarchy shown above, which of the following commands would properly import ThreadLocalRandom?
import java.util.concurrent.ThreadLocalRandom
import java.ThreadLocalRandom
import java.util.function.ThreadLocalRandom
import ThreadLocalRandom.concurrent.util.java
76
What will the following algorithm display after running the code below?
3
1
4
2
77
What is necessary for the upgraded game to operate as described but not directly provided?
Location of landmarks used in the game.
Speed traveling
User name
GPS location of user
78
What protocol below guides the rules about how data are subdivided into packets before transmission?
HTTP
TCP
FTP
DNS
79
What will the program above display?
4 8
2 7
3 7
2 8
80
What is considered a reasonable amount of time?
(10+7)^n
2^n
10n
n!
81
Order the following hardware from low-level abstraction to high-level abstraction.Video cardTransistorComputer
Transistor, video card, and computer
Hardware does not have abstraction levels
Transistor, computer, and video card
Video card, transistor, and computer
82
What will the following algorithm display? a ← 26 MOD 13 DISPLAY (a)
26
8
0
13
83
What is the value of sum displayed after this algorithm is run?
4
6
Error
0
84
What does the algorithm display?
5
7
3
4
85
Convert 88DEC to a binary number.
1011000BIN
1111000BIN
1000001BIN
1010101BIN
86
What will the following algorithm display?a ← 13 MOD 26DISPLAY (a)
26
13
0
8
87
What does the following algorithm display?
It always displays “True.”
When B is false, the algorithm displays “False.”
When A is false, the algorithm displays “False.”
It always displays “False.”
88
What is the code segment displaying?
34
0
68
17
89
What is displayed as a result of executing the following code segment?
Moose Benji Novack Waffle Noodles
Dog Waffle Noodles Moose Novack Benji
Waffle Moose Noodles Novack Benji
Dog Waffle Moose Noodles Novack Benji
90
Which of the following protocol standardization is NOT a function of the IETF (Internet Engineering Task Force)?
Internet Protocol
JavaScript Coding Protocol
Hypertext Transfer Protocol
Simple Mail Transfer Protocol
91
What is a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly?
syntax error
overflow error
run-time error
logic error
92
Which of the following is the
MOST
likely data privacy concern of the upgraded game?
The player’s score
How much time a person spent playing the game
How many locations the player visited
Recording whether the player was speeding when driving to a location.