WGU E010 FOUNDATIONS OF PROGRAMMING
(PYTHON) – 2026 UPDATED OA | 100 QUESTIONS
& VERIFIED ANSWERS | COMPLETE STUDY
GUIDE WITH FULL SAMPLE QUESTIONS
Core Domains:
Python Syntax and Basic Operations
Data Types, Variables, and Type Conversion
Control Structures (Conditionals, For Loops, While Loops)
Functions, Scope, and Parameter Passing
Data Structures (Lists, Tuples, Dictionaries, Sets)
String Manipulation and Slicing
File I/O and Exception Handling
Iteration and Iterables
Built-in Functions and Methods
Debugging and Problem-Solving
This comprehensive Objective Assessment (OA) study guide is designed to prepare
students for the WGU E010 Foundations of Programming (Python) exam. The
questions are drawn from topics covered in the latest 2026 exam, including Python
syntax, data types, control flow, functions, and data structures. The WGU E010
exam tests entry-level Python programming competency through multiple-choice
questions and some code-based problem-solving. This guide provides verified
questions and detailed rationales to reinforce learning and support successful
exam completion.
SECTION ONE: QUESTIONS 1 – 100
Question 1
What is the correct way to output the string "Hello, World!" in Python?
A. printf("Hello, World!")
B. console.log("Hello, World!")
,C. print("Hello, World!")
D. echo "Hello, World!"
C. print("Hello, World!")
RATIONALE: Python's built-in print() function outputs text to the console.
The other options are used in other languages (C, JavaScript, PHP). Understanding
the correct syntax for output is foundational to Python programming.
Question 2
Which of the following is a valid variable name in Python?
A. 2nd_place
B. my-var
C. my_var
D. class
C. my_var
RATIONALE: Variable names must start with a letter or underscore, cannot
contain hyphens, and cannot be a reserved keyword (class is a keyword).
Underscores are allowed and commonly used.
Question 3
What is the data type of the value 3.14 in Python?
A. int
B. float
C. string
D. boolean
B. float
RATIONALE: Numbers with a decimal point are of type float (floating-point).
Integers have no decimal point.
Question 4
,Given x = 5 and y = 2, what is the result of x // y?
A. 2.5
B. 2
C. 2.0
D. 1
B. 2
RATIONALE: The floor division operator // returns the integer quotient
(discards the remainder). 5 // 2 = 2. This is distinct from true division (/), which
always returns a float.
Question 5
Which operator is used to check if two values are equal in Python?
A. =
B. ==
C. !=
D. ===
B. ==
RATIONALE: == is the equality comparison operator. = is the assignment
operator. != means "not equal." === is not valid in Python.
Question 6
What is the output of print(type(10))?
A. <class 'int'>
B. <class 'float'>
C. 'int'
D. <class 'str'>
A. <class 'int'>
RATIONALE: The type() function returns the type object; printing it
displays <class 'int'> for an integer.
, Question 7
Which of the following is NOT a valid way to create a string in Python?
A. "hello"
B. 'hello'
C. hello
D. """hello"""
C. hello
RATIONALE: Backticks are not used for strings in Python; they are used in
other languages for command substitution. Single quotes, double quotes, and triple
quotes are valid ways to create strings.
Question 8
What will the following code output? print(3 + 2 * 4)
A. 20
B. 14
C. 11
D. 24
C. 11
RATIONALE: Multiplication has higher precedence than addition. 2 * 4 = 8,
then 3 + 8 = 11.
Question 9
Which of the following correctly converts the string "123" to an integer?
A. int("123")
B. str(123)
C. float("123")
D. int(123)
A. int("123")
(PYTHON) – 2026 UPDATED OA | 100 QUESTIONS
& VERIFIED ANSWERS | COMPLETE STUDY
GUIDE WITH FULL SAMPLE QUESTIONS
Core Domains:
Python Syntax and Basic Operations
Data Types, Variables, and Type Conversion
Control Structures (Conditionals, For Loops, While Loops)
Functions, Scope, and Parameter Passing
Data Structures (Lists, Tuples, Dictionaries, Sets)
String Manipulation and Slicing
File I/O and Exception Handling
Iteration and Iterables
Built-in Functions and Methods
Debugging and Problem-Solving
This comprehensive Objective Assessment (OA) study guide is designed to prepare
students for the WGU E010 Foundations of Programming (Python) exam. The
questions are drawn from topics covered in the latest 2026 exam, including Python
syntax, data types, control flow, functions, and data structures. The WGU E010
exam tests entry-level Python programming competency through multiple-choice
questions and some code-based problem-solving. This guide provides verified
questions and detailed rationales to reinforce learning and support successful
exam completion.
SECTION ONE: QUESTIONS 1 – 100
Question 1
What is the correct way to output the string "Hello, World!" in Python?
A. printf("Hello, World!")
B. console.log("Hello, World!")
,C. print("Hello, World!")
D. echo "Hello, World!"
C. print("Hello, World!")
RATIONALE: Python's built-in print() function outputs text to the console.
The other options are used in other languages (C, JavaScript, PHP). Understanding
the correct syntax for output is foundational to Python programming.
Question 2
Which of the following is a valid variable name in Python?
A. 2nd_place
B. my-var
C. my_var
D. class
C. my_var
RATIONALE: Variable names must start with a letter or underscore, cannot
contain hyphens, and cannot be a reserved keyword (class is a keyword).
Underscores are allowed and commonly used.
Question 3
What is the data type of the value 3.14 in Python?
A. int
B. float
C. string
D. boolean
B. float
RATIONALE: Numbers with a decimal point are of type float (floating-point).
Integers have no decimal point.
Question 4
,Given x = 5 and y = 2, what is the result of x // y?
A. 2.5
B. 2
C. 2.0
D. 1
B. 2
RATIONALE: The floor division operator // returns the integer quotient
(discards the remainder). 5 // 2 = 2. This is distinct from true division (/), which
always returns a float.
Question 5
Which operator is used to check if two values are equal in Python?
A. =
B. ==
C. !=
D. ===
B. ==
RATIONALE: == is the equality comparison operator. = is the assignment
operator. != means "not equal." === is not valid in Python.
Question 6
What is the output of print(type(10))?
A. <class 'int'>
B. <class 'float'>
C. 'int'
D. <class 'str'>
A. <class 'int'>
RATIONALE: The type() function returns the type object; printing it
displays <class 'int'> for an integer.
, Question 7
Which of the following is NOT a valid way to create a string in Python?
A. "hello"
B. 'hello'
C. hello
D. """hello"""
C. hello
RATIONALE: Backticks are not used for strings in Python; they are used in
other languages for command substitution. Single quotes, double quotes, and triple
quotes are valid ways to create strings.
Question 8
What will the following code output? print(3 + 2 * 4)
A. 20
B. 14
C. 11
D. 24
C. 11
RATIONALE: Multiplication has higher precedence than addition. 2 * 4 = 8,
then 3 + 8 = 11.
Question 9
Which of the following correctly converts the string "123" to an integer?
A. int("123")
B. str(123)
C. float("123")
D. int(123)
A. int("123")