Hi! I have these computer science python questions, please answer asap!
1. A dictionary key may consist of mutable data types.
A. True
B. False
2. Dictionary searches take about the same amount of time regardless of the number of dictionary items.
A. True
B. False
3. Identify the statistical term for a collection of counters.
A. List
B. Key-value pair
C. Histogram
D. Lookup
4. Using the in operator with a file input object and a for loop is a valid substitute for readline().
A. True
B. False
5. Identify the term given when an algorithm is applied to each element in a sequence.
A. Map
B. Filter
C. Reduction
D. Delimiter
6. Identify the correct term given to an object with more than one variable reference.
A. Use case
B. Equivalent
C. List
D. Alias
7. Python lists are immutable.
A. True
B. False
8. Closing a file does NOT reset the file object file pointer.
A. True
B. False
9.Lengthy conditional expressions may span multiple lines using parentheses.
A. True
B. False
10.What contractual term is given to a function’s name, argument list, behavior, and return value (if any)?
A. Interface
B. Generalization
C. Encapsulation
11. Identify the output from the following Python function.
def foo():
for i in range(4):
print(i * 2, end = '')
A. 0123
B. 0246
C. 1234
D. 2468
D. Branch
Answer 1) True
Answer 2) True
Answer 3) Histogram
Answer 4) False
Answer 5) (A) map
Answer 6) (D) Alias
Answer 7) False
Answer 8) True
Answer 9) True
Answer 10) (A) Interface
Answer 11) (B) 0246
Hi! I have these computer science python questions, please answer asap! 1. A dictionary key may...