stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Shaw Dalton AP Exam Reveiw Flashcards | StudBud
Explore
/
Shaw Dalton AP Exam Reveiw
Shaw Dalton AP Exam Reveiw
100 terms
·
StudBud Administration
·
4 plays
Imported from external platform
Flashcards
100 cards
F
Practice quiz
P
Host live
L
Questions
100
Answers
1
What is a reason to use a procedure?
To avoid duplicating code
When you need a section of code once in a program
To avoid a loop
To use with a condition
2
Choose the code used to print the following:"Friends"
System.out.print ("/"Friends/"");
System.out.print ("\\"Friends \\"");
System.out.print ("\"Friends\"");
System.out.print (""Friends"");
3
What are two aspects of efficiency?
wall clock time and CPU time
execution time and length of code
execution time and memory usage
memory usage and length of code
4
Why does program code have to be run through a compiler?
Program code must be debugged by the compiler before it can ever run.
It doesn’t, as the new program could be run directly from the code.
Program code must be translated into a language the computer understands.
Program code is write-only until it is run through a compiler.
5
Why is a "divide and conquer" search more efficient than a linear search?
You have to search all the values
It is less efficient with large datasets
You only look at half the dataset
You eliminate half the dataset with each
6
Which type of loop runs a set number of times?
Indefinite
REPEAT UNTIL
REPEAT n TIMES
Infinite
7
What will the following algorithm display after running the code below?
3
1
2
4
8
The procedure isFound(list, item)will return TRUE if an item is found in list What will the following procedure display?
[1, 6, −4]
[1, 35, 6, 76, 4, 98, 5, 1, 8, 96, −4]
[ ]
[4, 6, −4]
9
What is a special data type that had one of two values?
Bit
Nothing
A boolean
Bytes
10
What is/are used to determine whether code should be run for both "IF" statements and "REPEAT UNTIL" loops?
Iterations
Pseudocode
Conditions
Events
11
In the following flowchart, what is the value of RESULT?
True when both A and B are true
Always false
Always true
True when either A or B are true
12
Which of the following is the MOST likely data privacy concern of the upgrades game?
How many locations the player visited
The player’s score
Recording whether the player was speeding when driving to a location.
How much time a person spent playing the game
13
With a problem that cannot be solved for all cases, what can sometimes be used as a close approximation?
A tractable solution
A solvable solution
A heuristic solution
A travelling solution
14
What will the following code segment display?
11
Nothing will be displayed due to an error.
6
3
15
What is the appropriate name for the procedure?
ESCAPE()
SPIN()
CAN_ESCAPE()
IS_TRAPPED()
16
What should replace <missing condition> so that the program below display TRUE 10% of the time?
x < 9
x <= 9
x <= 1
x < 1
17
The following program is intended to display the string 789. What type of error will the following procedure cause?
Runtime Error
Logic Error
Syntax Error
No Error
18
When should a heuristic algorithm be used?
When finding the lifetime batting average of Mookie Wilson
When choosing which files could have been exposed to a virus
Finding the quickest way to drive from Orlando, Florida, to Alaska
When calculating the average score for the national SAT test
19
Which of the following is a negative trade-off inherent in lossless compression?
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.
The image quality will be less and will result in a blurry image.
20
What is the code segment displaying?
68
34
0
17
21
We can convert a number from decimal to octal (base 8) by repeatedly subtracting the largest possible powers of what?
8
9
2
7
22
What will the executed code display?
All even numbers between 1 and 12
All odd numbers between 1 and 12
All even numbers between 3 and 12
All odd numbers between 3 and 12
23
What is the maximum number of searches required if using a linear search on list containing 2,000 numbers?
2,000
11
1,000
1
24
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
25
What is the minimum number of lines that must be cut to isolate F completely?
6
8
4
0
26
What will the following code segment display?
3
11
6
Nothing will be displayed due to an error.
27
What is storage methods that make accessibility for data easiest for people in multiple locations?
USB Flash Drive,as it can be copied and handed or mailed to multiple users.
Mainframe Computer, as it can be accessed from many computers.
Cloud Drive, as it allows for multiple users and version control.
Magnetic Drive System. as it can handle all data types.
28
What will the program segment display?
2
34
99
3
29
Which of the following is not necessarily a feature of a robust program?
Will anticipate the types of errors that users of the program may make
Uses algorithms that give correct answers for extreme data values
Will run on any computer without modification
Does not allow execution to proceed with invalid data
30
What should replace <missing condition> so that the program below displayes TRUE 60% of the time?
x < 6
x >= 9
x > 10
x >= 6
31
Which of the following can be represented by a single binary digit?
Date
Time
Light on / light off
Geographic location
32
Else statements?
do not need an "if" statement to run
run each time an "if" condition is true
run every time an "if" statement runs
run when an "if" condition is false
33
What is the following program returning?
37
25
27
20
34
Which of the following computer languages have the highest level of abstractions?
All of the above
COBOL
Machine code
Python/JAVA
35
What will the following code segment display?
1 4 7 10 9
10
Nothing will be displayed due to the error index out of bounds.
9 10 7 4 1
36
What is the value of sum displayed after this algorithm is run?
6
0
4
Error
37
What will the following algorithm display?
19
13
18
17
38
What does the algorithm display?
7
4
3
5
39
Sort the following by levels of abstraction, from lowest to highest:
I, IV, III, II
I, II, III, IV
I, III, IV, II
I, IV, II, III
40
What is displayed after running the algorithm below?
12
145
43
133
41
A mother is attempting to determine which cell phone plan best fits her family's needs.
I, Il, III, IV
I, III, IV, II
I, IV, II, III
III, I, II, IV
42
Which of the following lists is
NOT
a candidate for a binary search?
A list of numbers from smallest to larges
A list of words from a poem about sunshine in the order they appear.
A list of words in a dictionary
A list of students in order of height
43
Which of the following is least likely to receive targeted advertisements?
Individuals using the web browser with the Do Not Track setting engaged
Individuals using the web browser without the Do Not Track option
Users with strong passwords and multifactor authentication
Users visit websites with digital certificate that block advertisements.
44
What does the following algorithm display?
It always displays “False.”
When A is false, the algorithm displays “False.”
When B is false, the algorithm displays “False.”
It always displays “True.”
45
What will the following algorithm display?
13
1
8
26
46
Which command can replace <Missing Condition> to result in the last column of the table shown below?
b AND (a AND b)
a AND (a AND b)
a OR b
NOT (a AND b)
47
What is displayed as a result of executing the code segment?
Dog Cat Fish
Dog Cat Fish Golden Bandicoot
Golden Bandicoot Cat Fish
Dog Golden Bandicoot Cat Fish
48
What is displayed as a result of executing the following code segment?
Moose Benji Novack Waffle Noodles
Waffle Moose Noodles Novack Benji
Dog Waffle Moose Noodles Novack Benji
Dog Waffle Noodles Moose Novack Benji
49
Which of the following is NOT metadata?
The date the photo was taken
The geographic location where the picture was taken
The filename
The Red, Green, and Blue values of the top left pixel
50
Which of the following are benefits to having information be easily accessible and changeable?
I only
I and II only
II and III only
I, II, and III
51
What type of problem cannot currently be determined or explained by an algorithm?
Tractable problem
Indefinite problem
Undecidable problem
Unreasonable problem
52
What is the minimum number of searches for a binary search using an ordered list of 100 numbers?
100
0
1
8
53
What will y display?
0
16
14
20
54
What percentage of the time will the program display an even number?
40%
50%
10%
20%
55
Sequential statements?
run until the user enters "done"
run until a loop finishes
run one after the other in the order given
run only when the condition is true
56
Which of the following test cases will NOT find the maximum number in the list?
list1[4]
list1[−23, −67, −3, −7]
list1[23, 67, 3]
list1[0, 0, 0, 0]
57
Find the error in the following low-level programming code.
The 34th 0 should be a 1.
The 84th digit should be a 1.
The 17th 1 needs to be changed to a 0.
This is too difficult, to determine errors
58
Which of the following protocol standardization is NOT a function of the IETF (Internet Engineering Task Force)?sponses
Hypertext Transfer Protocol
Internet Protocol
Simple Mail Transfer Protocol
JavaScript Coding Protocol
59
What will the following code segment display?
1
22
30
10
60
What is displayed by runnning the code segment?
3 11 3
8 4 6
11 3 8
3 3 6
61
What is 10 MOD 2
0
4
2
2
62
What will the following program display?
OXXOO
OOOXX
OXXOXXOXX
The program is an infinite loop.
63
Due to an incorrect total value. What type of error did the below procedure suffer from?
Logical error
Runtime error
No error. The program works as intended
Syntax error
64
Which of the following test cases will return the correct average using the above procedure?
numbers[3, 5, 11, 6]
numbers[11, 35, 6]
numbers[0, 1, 35, 6]
numbers[1, 1, 35, 6]
65
What will the following algorithm display?
2 12 2
2 14 17
14 17 2
13 17 5
66
Which of the following types of components is necessary for cybersecurity?
I, II, and III
I only
I and II only
III only
67
What should replace so the program below displays TRUE 60% of the time?
x MOD 5 = 5
x MOD 2 = 1
x MOD 2 = 0
x MOD 5 = 0
68
What will the program above display?
4 8
2 8
3 7
2 7
69
When is a compound condition using the logical operator AND true?
When both conditions are false
When both conditions are true
When the NOT operator is also used
When either of the conditions are true
70
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
71
Which of the following illustrate ways that the internet facilitates collaboration?
II and III only
I, II, and III
I and III only
I only
72
What will be the result of the displayed program?
7 5 9
9 5 7
6 14
14 6
73
What is the minimum number of binary digits needed to store the number 56?
3
6
5
1
74
What data is not directly provides by user, but is necessary for the ugraded game?
Location of landmarks used in the game.
User name
Speed traveling
GPS location of user
75
What is displayed because of executing the code segment?
3 9
1 5 7
1 3 5 7 9
9
76
What is displayed as a result if the user inputs “Karel” to the program?
Hello Karel
What is your name?Hello Karel
What is your name?HelloKarel
What is your name? Hello Karel
77
Which of the following expressions does not evaluate to 0.2?
Math.sqrt(4) / Math.sqrt(100)
2.0 / 10
(double)(2 / 10)
(1.0 * 2) / (1.0 * 10)
78
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
79
What will be the output of the following program?
9 5 7
14
14 6
7 5 9
80
Evaluate the following expression: 4 + 6 % 12 / 4
4
4.5
1
5
81
What type of error did the procedure below suffer from?
Logical error
Runtime error
No error. The program works as intended.
Syntax error
82
Which of the following input data is needed by the upgraded game that was NOT needed by the original game?
Age of the player
GPS location
Event sensing; an event would be the user pushing a button or screen
Picture of the player
83
What could a single binary value represent?
Volume on a radio
If a light is on or off
Time
Temperature in degrees Celsius
84
What percentage of the time will the following program display a number?
10%
25%
75%
20%
85
Which of the following statements is
NOT
correct
Hardware is the lowest level of abstraction
Binary data is processed by physical layers of computing hardware
Logic gates are modeled by Boolean functions
Logic gates are used to perform operations such as addition and subtraction
86
Which of the statements below are true.
I, II, and IV only
I only
All of the above
II, III, and IV only
87
Which of the following lines of code would cause an error with a robot?
NOT CAN_M0VE (forward)
NOT CAN_MOVE (left)
CAN_MOVE (north)
CAN_MOVE (right)
88
What are variables used for in programs?
They hold values, numbers, or strings
They hold the indices for a list name
They link libraries of programs to the current program
They indicate how long the fraction part of a real number is
89
What would be a good use of constants when initializing variables at the beginning of a program?
I and II only
II and III only
I, II, and III
I and III only
90
Which of the following has the lowest level of hardware abstraction?
Computer chips
Computer
Transistors
Motherboard
91
How do parameters and arguments differ?
Parameters are sent to procedures where they are then used as arguments.
Arguments are the intermediate values in a calculation
The words can be used interchangeably.
Arguments are sent to procedures where they are then used as parameters.
92
What will the above program display?
4 8 8
Nothing due to an infinite loop
3 8 0
2 8 14
93
What happens when there are syntax errors?
Nothing happens
The code runs as normal
Your program cannot run
Your computer crashes
94
Which combination of statements can be used to express algorithms?
Iterative, sequential, and selection
Readable, iterative, and efficient
Correctness, efficiency, and clarity
Selection, conditional, and Boolean
95
How many lines need to be cut to completely isolate computer E from computer C?
8
3
0
6
96
Which of the following is true about data compression?
Lossless data compression is the best compression under all conditions.
Data compression can be used to reduce the size of a file.
Data compression can be used for pictures and video only.
Lossy compression cannot be used when sending pictures.
97
Which of the following statements below is NOT true?
lossless is the idea of breaking a file into smaller forms for transmission
Moving music onto your digital music player is done is a lossless format
Scanning in a picture creates a lossy format result.
Lossy format is used for being rebuilt exactly pre-compression
98
What is returned by
cube(cube(2))
?
512
128
8
64
99
What will the following algorithm display?
1
0
26
13
100
Which of the choices below properly identify these concepts?
Lexicographic and Asymmetric
Symmetric and Steganography
Hash Codes and Key Transfers
Asymmetric and Symmetric