CIT 332 Final Actual EXAM Newest
2025/2026 With Complete Questions And
Correct Answers |Already Graded A+||Brand
New Version!|
Which of the following refer to the last element in a list
names? Check all that apply. - . . ANSWER ✔ ✔names[-
1]
names[len(names) - 1]
Analyze the following code
list1 = ['CS', 'Math', 'EE']major1, major2 = list1
which of the following statements are true? Check all that
apply. - . . ANSWER ✔ ✔There is an error because the
number of variables on the left-hand side is different from
the size of the list.
Analyze the following code
nums = [3, 7, 2, 1]print(len(nums))print(nums[-
1])print(nums[len(nums)]) - . . ANSWER ✔ ✔There is
an IndexError on line 4.
,2|Page
What is the output of the following code?
list1 = [2, 3, 21, 14, 25]print(list1[-1]) - . . ANSWER ✔
✔25
A list may have duplicates. - . . ANSWER ✔ ✔TRUE
Given list1 = [1, 5, 9], what is sum(list1)? - . . ANSWER ✔
✔15
Which of the following statements create empty lists? - . .
ANSWER ✔ ✔li = []
li = list()
Every element in a list must be of the same type? - . .
ANSWER ✔ ✔FALSE
What is the output of the following code?
list1 = [3, 5, 25, 1, 3]print(min(list1)) - . . ANSWER ✔
✔1
What's the output of the following code segment?
aList = [14, 55, 4, 34, 2, -3, 76]
,3|Page
index = 0
for i in range(1, len(aList)):
if ( aList[i] < aList[index] ):
index = i
print(index) - . . ANSWER ✔ ✔5
What is the output when following code is executed ?
listA = [-8, 3, 45, 22, 12, 85] for i in range (1, 6): listA[i - 1]
= listA[i] *2 for i in range(0, 6): print(listA[i], end = " ") - .
. ANSWER ✔ ✔6 90 44 24 170 85
What is the output when the following code is executed?
myList = [-85, 34, 23, 90, 123]maximumValue =
myList[0]indexOfMax = 0for i in range(1, len(myList)): if
(myList[i] > maximumValue): maximumValue = myList[i]
indexOfMax = i print(indexOfMax) - . . ANSWER ✔ ✔4
Given list1 is [1, 3, 2], what is the result of list1 * 2? - . .
ANSWER ✔ ✔[1, 3, 2, 1, 3, 2]
What is the output of the following code?
, 4|Page
list1 = [1, 2, 3, 4]list2 = [5, 6, 7, 8] print(len(list1 + list2)) -
. . ANSWER ✔ ✔8
What is printed by the following statements?
a = [4, 2, 8, 6, 5]b = a * 2b[3] = 999print(a) - . . ANSWER
✔ ✔[4, 2, 8, 6, 5]
What's the output of the following code?
a = [1, 2, 3, 4]b = [10, 20, 30, 40]c = a + bprint(c) - . .
ANSWER ✔ ✔[1, 2, 3, 4, 10, 20, 30, 40]
What is printed by the following statements?
a = [4, 2, 8, 6, 5]
b = [a] * 2
c=a*2
a[3] = 999
print(a)
print(b)
print(c) - . . ANSWER ✔ ✔[4, 2, 8, 999, 5]