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

WGU E010 Foundations of Programming (Python) Objective Assessment | OA V1 and V2 | Practice Questions and Answers | 2026 Study Guide

Document preview thumbnail
Preview 4 out of 55 pages

Master WGU E010 Foundations of Programming (Python) OA with Complete V1 & V2 Practice! This comprehensive study guide contains 89 carefully selected practice questions covering all major topics for the WGU E010 Foundations of Programming (Python) Objective Assessment (V1 & V2) — all with correct answers and detailed rationales. Perfect for WGU students or anyone learning Python programming fundamentals. What's Inside: - 89 questions with correct answers - Detailed rationales explaining each correct answer - "Why the other answers are wrong" explanations for every distractor - Reference citations per question for further verification - Covers Basic Python Syntax and Semantics - Control Flow: Conditionals and Loops - Data Structures: Lists, Tuples, Dictionaries, Sets - Functions and Scope - File Input/Output - Exception Handling - Object-Oriented Programming - Decorators and Generators - Works on phone, tablet, or computer What You'll Actually Learn: - Basic Python Syntax and Semantics - Control Flow: Conditionals and Loops - Data Structures: Lists, Tuples, Dictionaries, Sets - Functions and Scope - File Input/Output - Exception Handling - Object-Oriented Programming - Decorators and Generators - Lambda Functions - List Comprehensions and Generator Expressions - Python Memory Management - Modules and Imports Why This Guide Works: - Every question includes a clear, detailed rationale explaining the correct answer - Each incorrect answer includes a "Why the other answers are wrong" explanation - References are provided for each question for further verification - Understand the "why" behind each concept, not just the correct letter - Learn the reasoning so you can apply it to any exam question - Complete E010 OA review with 100% correct answers Who This Is For: - You, if you're taking E010 at WGU - You, if you're learning Python programming at any university - You, if you have an objective assessment coming up - You, if you want to study smarter, not harder Stop stressing. Start passing. Download this now and walk into your exam actually prepared.

Content preview

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON)
OBJECTIVE ASSESSMENT | OA V1 AND V2 | PRACTICE
QUESTIONS AND ANSWERS | 2026 STUDY GUIDE | 100%
CORRECT.
89 Questions with Answers and Detailed Rationales


100 PERCENT GUARANTEED PASS


INSTANT DOWNLOAD ANSWERS INCLUDED



IMPORTANCE OF THIS DOCUMENT
This comprehensive examination preparation guide has been meticulously developed to help you succeed in the
WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON) OBJECTIVE ASSESSMENT | OA V1 AND V2 |
PRACTICE QUESTIONS AND ANSWERS | 2026 STUDY GUIDE | 100% CORRECT.. It contains 89 carefully
selected questions that reflect the most current exam content and testing strategies. Each question is
accompanied by a correct answer and a detailed rationale that explains the underlying pathophysiology,
pharmacology, or clinical reasoning.

Self-Assessment – Test your knowledge and Exam Preparation – Familiarize yourself with the
identify areas requiring further question format and content
study areas

Concept Reinforcement – Deepen your Confidence Building – Develop test-taking
understanding through strategies and reduce
evidence-based exam anxiety
rationales
Time Management – Practice answering
questions under simulated
exam conditions




Review Summary 89 Questions


Foundations - Application - WGU E010 Foundations OF Programming Python Objective Assessment OA
V1 AND V2 AND 2026 Study Guide 100 Correct Computer Science / Python Programming Undergraduate
YEAR 1-2 Introductory Programming
All answers with rationales

,Table of Contents

Content Area Questions Key Topics

Basic Python Syntax AND 1-15 Print, Output, Python, Return, INIT SELF
Semantics

Control FLOW Conditionals 16-30 Python, Return, Numbers, Print, Primary Purpose
AND Loops

DATA Structures Lists Tuples 31-45 Print, Result, Return, Output, CHAR
Dictionaries SETS

Functions AND Scope 46-60 INIT SELF, Output, Print, Consider, Return


FILE Input/output 61-75 Python, Print, Return, Correctly, Output


Exception Handling 76-89 Output, Return, Print, Result, NEW CLS NAME


TOTAL 89 All questions include answers and detailed rationales

,Section A - Basic Python Syntax AND Semantics

Q1.
In Python, which of the following statements about variable scoping and the 'global'
keyword is correct when a variable is assigned inside a nested function?


A. The 'global' keyword allows modifying a B. Without 'global' or 'nonlocal', an
variable in the nearest enclosing non-global assignment inside a nested function always
scope. creates a new local variable, even if a
variable with the same name exists in the
enclosing scope.

C. The 'nonlocal' keyword is required to read D. If a variable is declared 'global' inside a
a variable from an enclosing function's nested function, it becomes accessible to all
scope. functions in the module, including other
nested functions.
Correct: B - Without 'global' or 'nonlocal', an assignment inside a nested function always
creates a new local variable, even if a variable with the same name exists in the enclosing
scope.


Rationale:In Python, assignment to a name in a function (including nested) makes that name
local to that function unless explicitly declared global or nonlocal. Reading a variable from an
enclosing scope does not require nonlocal; only assignment does. Global makes the name
refer to a module-level variable, but it does not make it accessible to other nested functions
as a nonlocal. Therefore, option B is correct.
Why the other answers are wrong:
A. 'global' refers to the module-level scope, not the nearest enclosing non-global scope; that is
'nonlocal'.
C. 'nonlocal' is only needed for assignment, not for reading an enclosing variable.
D. 'global' binds to the module's global namespace, not to the enclosing function's scope; it
does not create a shared variable among nested functions.
Reference: WGU E010 Foundations of Programming (Python) OA Study Guide, Ch. 3: Functions and
Scoping


Q2.
Consider the following code:

def func(a, b=[]):
b.append(a)
return b

print(func(1))
print(func(2))
print(func(3))




Page 3

, Section A - Basic Python Syntax AND Semantics



What is the output?



A. [1] [2] [3] B. [1] [1, 2] [1, 2, 3]

C. [1] [2, 1] [3, 2, 1] D. Error: 'list' object is not callable
Correct: B - [1] [1, 2] [1, 2, 3]


Rationale:In Python, default argument values are evaluated only once at function definition
time. Therefore, the list 'b' is the same mutable object across calls, accumulating appended
values. The output reflects this persistent state: [1], then [1, 2], then [1, 2, 3].
Why the other answers are wrong:
A. This would occur if 'b' were reinitialized to a new empty list each call, which is not the case.
C. Appending does not reverse order; the list retains insertion sequence.
D. No error occurs because the default list is mutable and can be modified.
Reference: WGU E010 Foundations of Programming (Python) OA Study Guide, Ch. 3: Functions -
Mutable Default Arguments


Q3.
Given the code:

x = [1, 2, 3]
y=x
x.append(4)
z = x.copy()
x.append(5)

What is the final value of y and z?


A. y = [1, 2, 3, 4, 5], z = [1, 2, 3, 4] B. y = [1, 2, 3, 4], z = [1, 2, 3, 4, 5]

C. y = [1, 2, 3, 4, 5], z = [1, 2, 3, 4, 5] D. y = [1, 2, 3, 4], z = [1, 2, 3, 4]
Correct: A - y = [1, 2, 3, 4, 5], z = [1, 2, 3, 4]


Rationale:y = x creates a reference to the same list object, so y reflects all mutations. z =
x.copy() creates a shallow copy at that moment, so z retains the state of x at the time of copy
(after first append, before second). Hence y has all five elements, z has the first four.
Why the other answers are wrong:
B. z is a copy made before the second append, so it doesn't include 5.
C. y is a reference, not a copy, but z is a copy made at an earlier time.
D. y is a reference and thus includes the last append as well.
Reference: WGU E010 Foundations of Programming (Python) OA Study Guide, Ch. 2: Lists and
References




Page 4

Document information

Uploaded on
September 5, 2026
Number of pages
55
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$16.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

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ProfReginaBank
4.7
(3)
Sold
17
Followers
2
Items
1331
Last sold
19 hours ago



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