• 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 54 pages
Exam (elaborations)

Wgu E010 Foundations Of Programming (Python) Objective Assessment Oa V3 Practice Questions And Answers With Rationales 2026 Study Guide| Instant Download

Document preview thumbnail
Preview 4 out of 54 pages

This study guide gives you 99 practice questions with clear rationales for WGU E010 Foundations of Programming (Python) Objective Assessment OA V3. It covers mutable objects, scoping, control flow, functions, classes, data structures, error handling, and file I/O. Each answer explains the reasoning so you can spot patterns and walk into the exam ready.

Content preview

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON)
OBJECTIVE ASSESSMENT OA V3 100 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 objects, scoping, and control flow

2 Design and evaluate functions, classes, and data structures to solve computational problems

3 Apply error handling, file I/O, and algorithmic reasoning to produce correct, robust Python programs

4 WGU E010 FOUNDATIONS OF PROGRAMMING

5 PYTHON

6 OBJECTIVE ASSESSMENT OA V3 100 PRACTICE QUESTIONS AND ANSWERS 2026 STUDY GUIDE
100% CORRECT.

7 Foundations of Computer Science - Python Programming Fundamentals

8 Applied Computer Science - Python Programming Fundamentals

9 Advanced Computer Science - Python Programming Fundamentals

10 Computer Science - Python Programming Fundamentals Review


ABSTRACT

This study document brings together 99 carefully worded exam questions drawn from WGU E010
FOUNDATIONS OF PROGRAMMING (PYTHON) OBJECTIVE ASSESSMENT OA V3 100
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
objects, scoping, and control flow, Design and evaluate functions, classes, and data structures to
solve computational problems, Apply error handling, file I/O, and algorithmic reasoning to produce
correct and robust Python programs. 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
OBJECTS, SCOPING, AND CONTROL FLOW
Given the following code, what is the final value of `result`?

```python
def modify(lst, val):
lst.append(val)
lst = [val]
return lst

nums = [1, 2]
result = modify(nums, 3)
result.append(4)
```
A. [3, 4] CORRECT

B. [1, 2, 3]

C. [1, 2, 3, 4]

D. [3]

RATIONALE: Inside modify, lst.append(val) mutates the caller's list nums to [1,2,3], but then lst is
rebound to a new list [3]. The function returns this new list. result refers to [3], and
result.append(4) yields [3,4]. The original nums is [1,2,3] but is not used.




Q2 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING MUTABLE
OBJECTS, SCOPING, AND CONTROL FLOW
Which statement about Python's `range()` function is correct when used in a `for`
loop?
A. range(5, 0, -1) produces the sequence 5, 4, 3, 2, 1. CORRECT

B. range(0, 5, -1) produces 0, -1, -2, -3, -4.

C. range(5) produces 1, 2, 3, 4, 5.

D. range(1, 5, 2) produces 1, 3, 5.

RATIONALE: range(start, stop, step) generates values from start up to but excluding stop.
range(5,0,-1) yields 5,4,3,2,1. Option B is empty because step is negative but start < stop. Option
C starts at 0. Option D stops before 5, yielding 1,3.




Page 2

,Q3 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING MUTABLE
OBJECTS, SCOPING, AND CONTROL FLOW
What is the output of the following code?

```python
def outer():
x = 10
def inner():
nonlocal x
x += 5
return x
return inner()

print(outer())
```
A. 15 CORRECT

B. 10

C. UnboundLocalError

D. 5

RATIONALE: The nonlocal keyword allows inner to modify x in the enclosing scope of outer. x
starts at 10, becomes 15, and inner returns 15. Without nonlocal, x += 5 would raise
UnboundLocalError because x would be treated as local to inner.




Q4 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING MUTABLE
OBJECTS, SCOPING, AND CONTROL FLOW
Consider the dictionary `d = {'a': 1, 'b': 2, 'c': 3}`. After executing `d['a'] = d.get('d',
0) + d.pop('b')`, what is the resulting dictionary?
A. {'a': 2, 'c': 3} CORRECT

B. {'a': 3, 'c': 3}

C. {'a': 1, 'c': 3}

D. KeyError

RATIONALE: d.get('d', 0) returns 0 because 'd' is absent. d.pop('b') removes 'b' and returns 2.
The expression becomes d['a'] = 0 + 2 = 2. The final dictionary is {'a': 2, 'c': 3}.




Page 3

, Q5 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING MUTABLE
OBJECTS, SCOPING, AND CONTROL FLOW
Which of the following best describes the difference between a `list` and a `tuple`
in Python?
A. Lists are mutable and typically used for homogeneous sequences; tuples are immutable and
often used for heterogeneous records. CORRECT

B. Lists can contain any data type; tuples can only contain numbers.

C. Tuples are mutable and support item assignment; lists are immutable.

D. Lists are indexed by integers; tuples are indexed by strings.

RATIONALE: Lists are mutable sequences, commonly used for collections of similar items.
Tuples are immutable and often used to represent fixed collections of heterogeneous data. The
other options misstate mutability or indexing rules.




Q6 ANALYZE AND PREDICT THE BEHAVIOR OF PYTHON CODE INVOLVING MUTABLE
OBJECTS, SCOPING, AND CONTROL FLOW
What is the output of the following code?

```python
try:
x=1/0
except ZeroDivisionError:
print('A')
finally:
print('B')
```
A. A followed by B CORRECT

B. B followed by A

C. Only A

D. Only B

RATIONALE: The try block raises ZeroDivisionError, which is caught by the except block, printing
'A'. The finally block always executes, printing 'B'. Thus output is 'A' then 'B'.




Page 4

Document information

Uploaded on
October 9, 2026
Number of pages
54
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