• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 53 pages
Exam (elaborations)

Wgu E010 Foundations Of Programming (Python) Objective Assessment Oa V1 And V2 Practice Exam Questions And Correct Answers Plus Rationales| Instant Download Pdf

Document preview thumbnail
Preview 4 out of 53 pages

Practice questions for the WGU E010 Foundations of Programming (Python) objective assessment, covering both OA versions. Questions focus on mutable and immutable types, scoping, control flow, functions, classes, data structures, error handling, file I/O, and algorithmic reasoning. Each item includes a clear rationale so you can check your reasoning and walk into the exam ready.

Content preview

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON)
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

Document information

Uploaded on
October 9, 2026
Number of pages
53
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$28.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
1004
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions