Conceptual Actual Emended Exam Questions
With Reviewed 100% Correct Detailed Answers
Guaranteed Pass!!Current Update
1. What does the **= operator do in Python?
A. Assigns a modulus value
B. Performs floor division
C. Raises a value to the power and assigns
D. Compares two numbers
2. What is the result of the following code?
python
CopyEdit
colors = ['red', 'blue', 'green']
colors.insert(1, 'yellow')
print(colors)
A. ['red', 'blue', 'yellow', 'green']
B. ['red', 'yellow', 'blue', 'green']
C. ['yellow', 'red', 'blue', 'green']
D. ['red', 'blue', 'green', 'yellow']
3. Which method should be used to add multiple elements from one list to
another?
A. append()
B. extend()
,C. add()
D. insert()
4. What is the result of this code?
python
CopyEdit
my_list = [1, 2, 3]
my_list.append([4, 5])
print(my_list)
A. [1, 2, 3, 4, 5]
B. [1, 2, 3, [4, 5]]
C. [1, 2, 3, 5]
D. [1, 2, 3, 4]
5. What does the .pop(1) method do in a list?
A. Adds an item at index 1
B. Removes and returns the item at index 1
C. Reverses the list
D. Removes the last item
6. What is a shallow copy of a list?
A. A duplicate that updates both lists when changed
B. A new list that references original elements
C. A reversed copy of the list
D. A tuple version of the list
, 7. What’s the difference between extend() and + when combining lists?
A. extend() modifies the original list; + creates a new one
B. Both create new lists
C. extend() works only with numbers
D. + modifies in-place
8. Which structure is immutable?
A. List
B. Tuple
C. Dictionary
D. Set
9. Why can tuples be used as dictionary keys but lists cannot?
A. Tuples are faster
B. Tuples are immutable
C. Tuples are smaller
D. Lists have no index
10. How do you access the first element of a tuple device = ('router', 'switch')?
A. device(0)
B. device[0]
C. device.get(0)
D. device{0}
11. What is the result of print(10 > 5)?
A. 0
B. True
C. False
D. 10 > 5