CMPT 120 Standard Final Exam |2025-2026 LATEST UPDATED| REAL
EXAM QUESTIONS AND ANSWERS | 100% RATED CORRECT | 100%
VERFIED | ALREADY GRADED A+
What is the duration of the CMPT 120 Standard Final Exam? - (answer)1 hour
What materials are allowed during the CMPT 120 Standard Final Exam? - (answer)No notes, no
papers, no books, no computers, no calculators, etc.
How are answers scored on the CMPT 120 Standard Final Exam? - (answer)Correct answers are
worth 1 point; incorrect, multiple, illegible, or unanswered questions are worth 0 points.
What is the output of the code print('3' + '4' * 2)? - (answer)C. 344
In the code fragment with a = 2.5 and b = 3.2, what are the printed values of a and b? -
(answer)A. i) and ii) are both true (a = 5.7, b = 8.9).
Which code fragment will make the variables a and b print 7 and 2 respectively? - (answer)B. t =
a; a = b; b = t.
, 2|Page
How many operators can replace ??? in print(2 ??? (10 % 4)) to print 4? - (answer)C. 2 of the
operators.
Which statements about Python strings and lists are true? - (answer)D. i) is false and ii) is true
(strings are immutable, lists are mutable).
What does the code print(lst[lst[1]]) with lst = [2, 0, -1, 1]? - (answer)A. 2.
What does the code print after modifying list S and assigning it to T? - (answer)B. [2, 1, 0].
Which statement prints 'zar' from the string s = 'lizard'? - (answer)B. print(s[2:5]).
Can there be duplicates in the keys and values of a dictionary? - (answer)D. i) is false and ii) is
true (keys must be unique, values can be duplicated).
How many of the three programs print 6? - (answer)B. 1 (only program 2 prints 6).
What does the program print if the user enters 'house' for a and 'mouse' for b? - (answer)C. no
done.