OBJECTIVE ASSESSMENT OA V1 AND V2 200 PRACTICE
QUESTIONS AND ANSWERS 2026 STUDY GUIDE 100% CORRECT.
99 QUESTIONS
TABLE OF CONTENTS
# TOPIC
1 Analyze and predict the behavior of Python code involving mutable/immutable types, scoping, and control
flow
2 Design and evaluate functions, classes, and data structures to solve computational problems correctly
and efficiently
3 Apply error handling, file I/O, and algorithmic reasoning to diagnose and correct program defects
4 WGU E010 FOUNDATIONS OF PROGRAMMING
5 PYTHON
6 OBJECTIVE ASSESSMENT OA V1 AND V2 200 PRACTICE QUESTIONS AND ANSWERS 2026
STUDY GUIDE 100% CORRECT.
7 Foundations of Computer Science - Introductory Programming in Python
8 Applied Computer Science - Introductory Programming in Python
9 Advanced Computer Science - Introductory Programming in Python
10 Computer Science - Introductory Programming in Python Review
ABSTRACT
This study document brings together 99 carefully worded exam questions drawn from WGU E010
FOUNDATIONS OF PROGRAMMING (PYTHON) OBJECTIVE ASSESSMENT OA V1 AND V2
200 PRACTICE QUESTIONS AND ANSWERS 2026 STUDY GUIDE 100% CORRECT., with the
strongest emphasis placed on Analyze and predict the behavior of Python code involving
mutable/immutable types, scoping, and control flow, Design and evaluate functions, classes, and
data structures to solve computational problems correctly and efficiently, Apply error handling, file
I/O and and algorithmic reasoning to diagnose and correct program defects. Every item follows the
wording style and level of reasoning you meet in the real paper, and each one is paired with a clear
rationale so the correct choice is never a guess. Work through the set at your own pace, mark the
questions that slow you down, then come back to them until the reasoning feels automatic.
Learners who revise this way walk into the exam room recognising the pattern behind the
questions instead of meeting them for the first time. Keep going - steady, honest practice is what
turns a difficult paper into a comfortable pass.
Page 1
,Q1 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING
MUTABLE/IMMUTABLE TYPES, SCOPING, AND CONTROL FLOW
Consider the following code:
x = [1, 2, 3]
y=x
y += [4]
z = x[:]
z += [5]
print(x, y, z)
What is the output?
A. [1, 2, 3, 4] [1, 2, 3, 4] [1, 2, 3, 4, 5] CORRECT
B. [1, 2, 3, 4, 5] [1, 2, 3, 4] [1, 2, 3, 4, 5]
C. [1, 2, 3, 4] [1, 2, 3, 4] [1, 2, 3, 5]
D. [1, 2, 3] [1, 2, 3, 4] [1, 2, 3, 4, 5]
RATIONALE: y = x makes y reference the same list; y += [4] mutates it in place, so x and y both
become [1,2,3,4]. z = x[:] creates a shallow copy; z += [5] mutates only z, yielding [1,2,3,4,5].
Thus A is correct; B-D misrepresent aliasing or copy semantics.
Page 2
,Q2 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING
MUTABLE/IMMUTABLE TYPES, SCOPING, AND CONTROL FLOW
A function is defined as:
def f(a, b=[]):
b.append(a)
return b
print(f(1))
print(f(2))
What is printed?
A. [1]
[2]
B. [1]
[1, 2] CORRECT
C. [1, 2]
[1, 2]
D. [1]
[2, 1]
RATIONALE: Default mutable arguments are evaluated once at function definition, so the same
list object is reused across calls. First call appends 1 -> [1]; second call appends 2 to the same
list -> [1,2]. This classic pitfall makes B correct; A assumes a fresh list each call, C and D
misorder or duplicate values.
Page 3
, Q3 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING
MUTABLE/IMMUTABLE TYPES, SCOPING, AND CONTROL FLOW
Which statement about Python's exception handling is TRUE?
A. The finally block executes only if no exception is raised.
B. An else block after try/except runs only if the try block completes without exception.
CORRECT
C. A bare except clause catches only Exception subclasses, not BaseException.
D. The raise statement without arguments re-raises the most recent exception only inside except
blocks.
RATIONALE: The optional else clause of a try/except/else/finally runs only when try finishes
without raising, so B is correct. A is false-finally always runs. C is false-bare except catches
BaseException. D is partially true but the question asks for the universally true statement; B is
the precise one.
Q4 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING
MUTABLE/IMMUTABLE TYPES, SCOPING, AND CONTROL FLOW
Given:
s = 'Python'
print(s[1:5:2])
What is the output?
A. yt CORRECT
B. yh
C. yho
D. tho
RATIONALE: Slicing s[1:5:2] starts at index 1 ('y'), stops before index 5, step 2 -> indices 1 and 3
-> 'y' and 't' -> 'yt'. B uses wrong indices, C includes index 5, D starts at index 2.
Page 4