stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Nguyen, Carter Summative Test Project. Flashcards | StudBud
Explore
/
Nguyen, Carter Summative Test Project.
Nguyen, Carter Summative Test Project.
101 terms
·
StudBud Administration
Imported from external platform
Flashcards
101 cards
F
Practice quiz
P
Host live
L
Questions
101
Answers
1
Which of the choices below properly identify these concepts?
Hash Codes and Key Transfers
Lexicographic and Asymmetric
Symmetric and Steganography
Asymmetric and Symmetric
2
What should replace <missing condition> so that the program below displays TRUE 60% of the time?
x >= 9
x >= 6
x < 6
x > 10
3
If a dictionary in Python is defined as
person = {"name": "Alice", "age": 25}
, what is the result of
person["age"]
?
name
None
25
Alice
4
What is the output of the following code snippet:
print((5 + 3) * 2)
?
8
13
10
16
5
Which ofthe following will correctly replace /*missing code */ ?
NOT CAN_MOVE(forward)
CAN_MOVE (right)
CAN_MOVE(right) OR NOT CAN_MOVE(forward)
NOT CAN_M0VE (right)
6
What will the executed code display?
All even numbers between 3 and 12
All odd numbers between 3 and 12
All odd numbers between 1 and 12
All even numbers between 1 and 12
7
What is the output of the following code snippet:
print("xyz" * 2)
?
xyz2
xyz xyz
xyzxyz
Error
8
What is the output of the following code snippet:
print(20 // 6)
?
4
3.33
3
2
9
What is wrong with this code if the goal is to print numbers 1 through 5?
Nothing
It stops at 4 instead of 5
It prints too many numbers
It causes an error
10
If a list in Python is defined as
numbers = [1, 2, 3, 4, 5]
, what is the result of
numbers[2]
?
2
4
1
3
11
Which of the following can be represented by a single binary digit?
Geographic location
Time
Date
Light on / light off
12
Which of the following is a true statement about data transmitted over the internet?
Packets are received in the same order that they are sent.
All data traveling over the internet is in binary.
The DNS has been challenged by the DMCA.
Internet redundancy is managed by standard-setting companies
13
Which function call will print 16?
print(mystery(2))
print(mystery(3))
print(mystery(5))
print(mystery(4))
14
What will the following algorithm display after running the code below?
2
3
1
4
15
If a list in Python is defined as
numbers = [10, 20, 30, 40]
, what is the result of
numbers[-1]
?
10
20
30
40
16
If a list in Python is defined as
numbers = [5, 10, 15, 20]
, what is the result of
numbers.pop(1)
?
10
20
15
5
17
What is the output of the following code snippet:
print("Code" + " " + "Quiz")
?
Code Quiz
CodeQuiz
Code, Quiz
Code-Quiz
18
Which of the following does NOT need to be considered when determining the credibility of a source?Responses
Author’s reputation and credentials
Publisher’s reputation and credentials
Use of persuasive techniques within the source
Sponsorship of the article or publisher
19
What is the hexadecimal representation of the decimal number 255?
100
1F
F0
FF
20
Which of the following lines of code would cause an error with a robot?
CAN_MOVE (north)
NOT CAN_M0VE (forward)
CAN_MOVE (right)
NOT CAN_MOVE (left)
21
What is the output of the following code snippet:
print(10 / 4)
?
2.0
2.5
2.25
2
22
Which of the following statements is
NOT
correct:
Logic gates are modeled by Boolean functions.
Binary data is processed by physical layers of computing hardware.
Logic gates are used to perform operations like addition and subtraction.
Hardware is the lowest level of abstraction.
23
What is the output of the following code snippet:
print(5 // 2)
?
2.5
5
2
3
24
What is the output of the following code snippet:
print("Python"[1:4])
?
yth
ytho
Pyt
yth
25
What is the output of the following code snippet:
print(8 != 8)
?
Error
True
None
False
26
What does the following algorithm display?
It always displays “True.”
It always displays “False.”
When B is false, the algorithm displays “False.”
When A is false, the algorithm displays “False.”
27
What will be the final value of count after this code runs?
6
3
2
5
28
If a list in Python is defined as
fruits = ["apple", "banana", "cherry"]
, what is the result of
fruits[1]
?
banana
apple
None
cherry
29
What is the hexadecimal representation of the decimal number 15?
F
E
10
1F
30
What should replace so the program below displays TRUE 60% of the time?
x MOD 2 = 0
x MOD 2 = 1
x MOD 5 = 5
x MOD 5 = 0
31
What should replace <missing condition> so that the program below display TRUE 10% of the time?
x < 9
x <= 1
x < 1
x <= 9
32
What is the binary representation of the decimal number 10?
1010
1110
1001
1100
33
Why does program code have to be run through a compiler?
Program code is write-only until it is run through a compiler.
Program code must be translated into a language the computer understands.
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.
34
Which of the following is an example of a high-level programming language?
Assembly
Python
Binary
Machine code
35
What is the final value of nums?
[10, 2, 3, 4]
[1, 10, 3, 4]
[1, 2, 3, 4]
[1, 10, 3]
36
What is the output of the following code snippet:
print("Python"[0])
?
P
t
y
h
37
What is the maximum number of searches required if using a linear search on list containing 2,000 numbers?
1000
2000
11
1
38
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.
39
What is the purpose of a compiler?
To debug a program
To store data in memory
To convert high-level code into machine code
To execute code line by line
40
If a dictionary in Python is defined as
student = {"name": "John", "grade": "A"}
, what is the result of
student["grade"]
John
name
A
None
41
What is the output of the following code snippet:
print(10 % 3)
?
1
10
0
3
42
What will the following code segment display?
Nothing will be displayed due to the error index out of bounds.
1 4 7 10 9
10
9 10 7 4 1
43
Which command can replace <Missing Condition> to result in the last column of the table shown below?
a AND (a AND b)
NOT (a AND b)
a OR b
b AND (a AND b)
44
f a list in Python is defined as
animals = ["cat", "dog", "rabbit"]
, what is the result of
len(animals)
?
5
2
4
3
45
If a variable
x
is initialized as
x = 8
, what is the result of
x % 3
?
2
3
1
0
46
If a list in Python is defined as
fruits = ["apple", "banana", "cherry"]
, what is the result of
fruits[-2]
?
None
apple
cherry
banana
47
A student writes a program where if x is divisible by both 3 and 5, it prints "FizzBuzz". Which condition works?
if x % 3 == 0 or x % 5 == 0:
if x % 3 and x % 5:
if x == 3 and x == 5:
if x % 3 == 0 and x % 5 == 0:
48
What is the output of the following code snippet:
print("Python".replace("P", "J"))
?
Error
Jython
Jyhon
Python
49
What is the main purpose of a function in programming?
To perform a specific task and return a result
To store data
To create a loop
To compile code
50
If a list in Python is defined as
colors = ["red", "blue", "green"]
, what is the result of
colors.remove("blue")
?
Error
["red", "blue", "green"]
["blue", "green"]
["red", "green"]
51
What is the minimum number of lines that must be cut to isolate F completely?
4
8
6
0
52
(True and False) or (not False)
False
Error
True
None
53
Which of the following protocol standardization is NOT a function of the IETF (Internet Engineering Task Force)?
Simple Mail Transfer Protocol
Hypertext Transfer Protocol
Internet Protocol
JavaScript Coding Protocol
54
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
55
Which of the following is
NOT
metadata?
The filename
The date the photo was taken
The geographic location where the picture was taken
The Red, Green, and Blue values of the top left pixel
56
What is the purpose of an 'if' statement in programming?
To define a variable
To terminate a program
To execute a block of code only if a condition is true
To repeat a block of code
57
What is the output of the following code snippet:
print(18 // 5)
?
4
3
3.6
5
58
What is the output of the following code snippet:
print(5 == 5)
?
True
False
Error
None
59
What is the output of the following code snippet:
print("Hello".upper())
?
Hello
HELLO
Error
hello
60
Which of the following is an example of a data structure?
Array
Variable
Function
Loop
61
What is the output of the following code snippet:
print("Python".startswith("Py"))
?
False
None
True
Error
62
What is the output of the following code snippet:
print(4 < 5 or 6 > 7)
?
True
False
None
Error
63
Which procedures below are correct?
II only
II and III
I only
I , II , and III
64
What is the output of the following code snippet:
print(4 ** 2)
?
12
20
16
8
65
Which of the following is an example of a conditional statement?
x = 10
print("Hello")
if (x > 5)
for (i = 0; i < 10; i++)
66
What is the output of the following code snippet:
print("Python"[1:4])
?
yth
yth
ytho
Pyt
67
If a variable
x
is initialized as
x = 5
, what is the result of
x ** 2
?
25
10
5
15
68
What is printed?
1 2 3 4
1 2 3 4 5
2 4
1 3 5
69
What is the binary representation of the decimal number 5?
101
110
111
100
70
Which best describes the role of TCP?
The foundation of data communication for the World Wide Web
The set of rules for the path packets taken on the fault-tolerant internet
A standard protocol for encrypting internet data
Setting rules for assigning numerical labels to internet-connected devices
71
What is the purpose of a loop in programming?
To repeat a block of code multiple times
To define a function
To terminate a program
To store data in a variable
72
If a list in Python is defined as
colors = ["red", "blue", "green"]
, what is the result of
colors.insert(1, "yellow")
?
Error
["red", "yellow", "blue", "green"]
["red", "blue", "green", "yellow"]
["yellow", "red", "blue", "green"]
73
What is displayed because of executing the code segment?
1 3 5 7 9
3 9
9
1 5 7
74
What is the result of the following operation:
len(["x", "y", "z"])
?
1
3
4
2
75
What will the following code segment display?
6
11
3
Nothing will be displayed due to an error.
76
If a dictionary in Python is defined as
car = {"brand": "Toyota", "year": 2020}
, what is the result of
car["brand"]
?
Toyota
2020
None
brand
77
In the following flowchart, what is the value of RESULT?
True when both A and B are true
Always false
True when either A or B are true
Always true
78
What is the output of the following code snippet:
print(5 > 3 and 2 < 4)
?
True
None
False
Error
79
If a list in Python is defined as
colors = ["red", "blue", "green"]
, what is the result of
colors.append("yellow")
?
["red", "blue", "green"]
["red", "blue", "green", "yellow"]
["yellow", "red", "blue", "green"]
Error
80
Which of the following is NOT an example of using citizen science as a possible solution?
The behavior of mysterious jellyfish on the beach or in the water.
Calculating PSAT scores for a school district
The behavior of fireflies during the summer months
Using ultrasonic microphones and sonograms to record bats.
81
What is the purpose of a variable in programming?
To repeat a block of code
To define a function
To store data that can be used and modified during program execution
To terminate a program
82
What is the primary purpose of an algorithm?
To store data in a database
To compile code into machine language
To create a user interface
To solve a specific problem or perform a task
83
Which of the following is an example of a loop structure?
if (x > 5)
print("Hello")
x = 10
while (x < 10)
84
What is the output of the following code snippet:
print(7 - 3 * 2)
?
8
1
4
-1
85
Which of the following is true about data compression?
Lossless data compression is the best compression under all conditions.
Lossy compression cannot be used when sending pictures.
Data compression reduces file size for storage or transmission.
Data compression can be used for pictures and video only.
86
Which of the following is an example of a Boolean value?
3.14
Hello, World!
True
42
87
What is displayed as a result of executing the following code segment?
Dog Waffle Noodles Moose Novack Benji
Dog Waffle Moose Noodles Novack Benji
Waffle Moose Noodles Novack Benji
Moose Benji Novack Waffle Noodles
88
What is the result of the following operation:
len(["a", "b", "c", "d"])
?
4
3
5
2
89
What is the output of the following code snippet:
print("abc" + "def")
?
abc def
Error
abc+def
abcdef
90
What is the output of the following code snippet:
print("Hello" + " " + "World")
?
Hello-World
Hello World
HelloWorld
Hello, World
91
What are two aspects of efficiency?Responses
wall clock time and CPU time
execution time and length of code
memory usage and length of code
execution time and memory usage
92
What does this code output?
['a', 'b', 'c']
['b', 'c', 'd']
['c', 'd']
['b', 'c']
93
What is the output of the following code snippet:
print("Python".lower())
?
Error
python
Python
PYTHON
94
Which of the following is NOT metadata for the picture?
The time the picture was taken
The picture of the dog
The memory space taken up by the picture
The location where the picture was taken
95
What is displayed after running the algorithm below?
12
145
43
133
96
If a variable
x
is initialized as
x = 20
, what is the result of
x // 3
?
6
6.67
7
5
97
What will the following code segment display?
11
3
6
Nothing will be displayed due to error
98
Which of the following test cases will return the correct average using the above procedure
numbers[0, 1, 35, 6]
numbers[3, 5, 11, 6]
numbers[1, 1, 35, 6]
numbers[11, 35, 6]
99
You want a procedure that returns the square of a number. Which version is correct?
B
C
Nothing
A
100
What is the output of the following code snippet:
print(2 ** 3)
?
6
12
9
8
101
We can convert a number from decimal to octal (base 8) by repeatedly subtracting the largest possible powers of what?
2
9
8
7