WGU E010 OBJECTIVE ASSESSMENT | FOUNDATIONS OF
PROGRAMMING (PYTHON) | COMPREHENSIVE
PRACTICE EXAM WITH VERIFIED ANSWERS AND
SOLUTIONS
CORE DOMAINS
• Python Syntax, Variables, and Data Types
• Operators and Expressions
• Control Structures: Conditionals and Loops
• Functions and Functional Programs
• Data Structures: Lists, Tuples, Dictionaries, and Sets
• String Manipulation and Formatting
• File Input/Output and Exception Handling
• Development Environments and Debugging
• Modules and Basic Object-Oriented Programming
• Code Tracing and Error Identification
INTRODUCTION
This comprehensive assessment is designed to evaluate mastery of Python
programming fundamentals for the WGU E010 Objective Assessment. It measures
knowledge of Python syntax, data types, operators, control structures, functions,
data structures, string manipulation, file I/O, exception handling, and debugging
within development environments. The exam employs a multiple-choice and code-
repair structure aligned with WGU's published E010 competencies. Emphasis is
placed on real-world application, code tracing, and problem-solving. Candidates
must demonstrate the ability to write, troubleshoot, and debug simple Python
programs, manipulate data structures, and identify basic programming
,constructs. This practice assessment mirrors the 30-question format reported by
recent students who completed E010.
OFFICIAL COURSE OVERVIEW
WGU E010 — Foundations of Programming (Python) is a foundational
programming course centered on writing, troubleshooting, and debugging simple
programs; Python syntax and structure; variables; loops; conditional statements;
development environments; data structures; and functional programs. WGU
publicly lists four technical competencies for the course: creating functional
programs, executing Python code in different development environments,
identifying basic Python programming constructs, and manipulating data
structures.
REPORTED ASSESSMENT FORMAT
Recent 2026 pass reports consistently describe a 30-question assessment with a
substantial mix of selected-response and short coding/code-repair items. The
reported competency weighting is approximately: Identifies Python
Programming Constructs (30%), Executes Python Code (17%), Manipulates Data
Structures (23%), Creates Functional Programs (30%). Programming prompts are
typically short: complete a function, add one or two lines, or repair a small bug
rather than build a large application from scratch.
SECTION ONE: QUESTIONS 1–200
Question 1
What is the correct way to create a variable named age with the value 25 in
Python?
A. age == 25
B. age := 25
C. age = 25
D. int age = 25
, C. age = 25
RATIONALE: Python uses the assignment operator = to assign values to
variables. == is a comparison operator, := is the walrus operator used in
expressions, and int age = 25 is invalid Python syntax.
Question 2
Which of the following is a valid variable name in Python?
A. 2nd_place
B. my-variable
C. _private_var
D. class
C. _private_var
RATIONALE: Variable names can start with a letter or underscore, followed by
letters, numbers, or underscores. They cannot start with a digit (eliminating A),
cannot contain hyphens (eliminating B), and cannot be reserved keywords like
class (eliminating D).
Question 3
What is the data type of the value 3.14 in Python?
A. Integer
B. Float
C. String
D. Boolean
B. Float
RATIONALE: Any number with a decimal point is a floating-point number
(float) in Python. Integers are whole numbers without a decimal point.
Question 4
What is the output of type()?
A. <class 'int'>
B. <class 'float'>
, C. <class 'str'>
D. <class 'bool'>
B. <class 'float'>
RATIONALE: In Python, the / operator always returns a float, even when the
result is a whole number. evaluates to 5.0, which is a float.
Question 5
Which function converts the string "123" to an integer?
A. str("123")
B. int("123")
C. float("123")
D. bool("123")
B. int("123")
RATIONALE: The int() function converts a value to an integer. "123" is a string
containing digits, so it can be successfully converted to the integer 123.
Question 6
What is the output of bool(0)?
A. True
B. False
C. 0
D. None
B. False
RATIONALE: In Python, 0 is considered False when converted to a Boolean.
Any non-zero number (positive or negative) is considered True.
Question 7
What is the output of bool("") (empty string)?
A. True
B. False
C. ""
D. Error
PROGRAMMING (PYTHON) | COMPREHENSIVE
PRACTICE EXAM WITH VERIFIED ANSWERS AND
SOLUTIONS
CORE DOMAINS
• Python Syntax, Variables, and Data Types
• Operators and Expressions
• Control Structures: Conditionals and Loops
• Functions and Functional Programs
• Data Structures: Lists, Tuples, Dictionaries, and Sets
• String Manipulation and Formatting
• File Input/Output and Exception Handling
• Development Environments and Debugging
• Modules and Basic Object-Oriented Programming
• Code Tracing and Error Identification
INTRODUCTION
This comprehensive assessment is designed to evaluate mastery of Python
programming fundamentals for the WGU E010 Objective Assessment. It measures
knowledge of Python syntax, data types, operators, control structures, functions,
data structures, string manipulation, file I/O, exception handling, and debugging
within development environments. The exam employs a multiple-choice and code-
repair structure aligned with WGU's published E010 competencies. Emphasis is
placed on real-world application, code tracing, and problem-solving. Candidates
must demonstrate the ability to write, troubleshoot, and debug simple Python
programs, manipulate data structures, and identify basic programming
,constructs. This practice assessment mirrors the 30-question format reported by
recent students who completed E010.
OFFICIAL COURSE OVERVIEW
WGU E010 — Foundations of Programming (Python) is a foundational
programming course centered on writing, troubleshooting, and debugging simple
programs; Python syntax and structure; variables; loops; conditional statements;
development environments; data structures; and functional programs. WGU
publicly lists four technical competencies for the course: creating functional
programs, executing Python code in different development environments,
identifying basic Python programming constructs, and manipulating data
structures.
REPORTED ASSESSMENT FORMAT
Recent 2026 pass reports consistently describe a 30-question assessment with a
substantial mix of selected-response and short coding/code-repair items. The
reported competency weighting is approximately: Identifies Python
Programming Constructs (30%), Executes Python Code (17%), Manipulates Data
Structures (23%), Creates Functional Programs (30%). Programming prompts are
typically short: complete a function, add one or two lines, or repair a small bug
rather than build a large application from scratch.
SECTION ONE: QUESTIONS 1–200
Question 1
What is the correct way to create a variable named age with the value 25 in
Python?
A. age == 25
B. age := 25
C. age = 25
D. int age = 25
, C. age = 25
RATIONALE: Python uses the assignment operator = to assign values to
variables. == is a comparison operator, := is the walrus operator used in
expressions, and int age = 25 is invalid Python syntax.
Question 2
Which of the following is a valid variable name in Python?
A. 2nd_place
B. my-variable
C. _private_var
D. class
C. _private_var
RATIONALE: Variable names can start with a letter or underscore, followed by
letters, numbers, or underscores. They cannot start with a digit (eliminating A),
cannot contain hyphens (eliminating B), and cannot be reserved keywords like
class (eliminating D).
Question 3
What is the data type of the value 3.14 in Python?
A. Integer
B. Float
C. String
D. Boolean
B. Float
RATIONALE: Any number with a decimal point is a floating-point number
(float) in Python. Integers are whole numbers without a decimal point.
Question 4
What is the output of type()?
A. <class 'int'>
B. <class 'float'>
, C. <class 'str'>
D. <class 'bool'>
B. <class 'float'>
RATIONALE: In Python, the / operator always returns a float, even when the
result is a whole number. evaluates to 5.0, which is a float.
Question 5
Which function converts the string "123" to an integer?
A. str("123")
B. int("123")
C. float("123")
D. bool("123")
B. int("123")
RATIONALE: The int() function converts a value to an integer. "123" is a string
containing digits, so it can be successfully converted to the integer 123.
Question 6
What is the output of bool(0)?
A. True
B. False
C. 0
D. None
B. False
RATIONALE: In Python, 0 is considered False when converted to a Boolean.
Any non-zero number (positive or negative) is considered True.
Question 7
What is the output of bool("") (empty string)?
A. True
B. False
C. ""
D. Error