WGU E010 FOUNDATIONS OF PROGRAMMING
(PYTHON) COMPREHENSIVE OA MASTER STUDY
GUIDE: QUESTIONS AND CORRECT ANSWERS
(VERIFIED ANSWERS) PLUS RATIONALES 2026
Q&A | INSTANT DOWNLOAD PDF
Core Domains:
Python Syntax and Structure
Variables, Data Types, and Operators
Conditional Statements and Control Flow
Loops (For and While)
Data Structures (Lists, Tuples, Dictionaries, Sets)
String Manipulation and Indexing
Functions and Scope
File I/O and Exception Handling
Debugging and Error Resolution
Applied Coding and Problem-Solving
This comprehensive study guide is designed to prepare students for the WGU E010
Foundations of Programming (Python) Objective Assessment. The examination
evaluates foundational programming knowledge, including syntax, data structures,
control flow, and problem-solving using Python. Questions are structured to assess
both theoretical understanding and practical coding skills, with an emphasis on
real-world application and critical thinking. Each question includes a verified
correct answer and a detailed rationale to reinforce learning and support exam
preparation. The guide reflects the most current 2026 curriculum standards for
WGU’s E010 course.
,SECTION ONE: QUESTIONS 1 – 100
Question 1
What is the correct output of the following Python code? print("Hello, World!")
A. Hello, World! (without quotes)
B. "Hello, World!" (with quotes)
C. print("Hello, World!")
D. An error occurs
A. Hello, World! (without quotes)
RATIONALE: The print() function outputs the string literal to the console
without the quotation marks. The quotes are used only to denote the string in the
code, not as part of the output .
Question 2
Which of the following is a valid variable name in Python?
A. 2nd_place
B. my_var
C. my-var
D. class
B. my_var
RATIONALE: Variable names must start with a letter or underscore, cannot
contain hyphens, and cannot be reserved keywords. "class" is a reserved keyword,
"2nd_place" starts with a digit, and "my-var" contains a hyphen .
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 .
Question 5
What is the result of 10 % 3?
A. 3.33
B. 1
C. 3
D. 0
B. 1
RATIONALE: The modulo operator % returns the remainder of a
division. 10 divided by 3 is 3 with a remainder of 1, so 10 % 3 = 1 .
Question 6
Which of the following data types is immutable?
, A. list
B. dict
C. set
D. tuple
D. tuple
RATIONALE: Tuples are immutable—once created, they cannot be changed.
Lists, dictionaries, and sets are mutable and can be modified after creation .
Question 7
What is the output of print(type())?
A. <class 'int'>
B. <class 'float'>
C. <class 'double'>
D. <class 'str'>
B. <class 'float'>
RATIONALE: In Python, the / operator performs true division and always
returns a float, even when the numbers divide evenly. evaluates to 5.0,
so type(5.0) is float .
Question 8
Which symbol begins a single-line comment in Python?
A. //
B. #
C. *
D. %
B. #
RATIONALE: The hash symbol (#) is used for single-line comments in
Python. // is used in C/Java, /* */ for multi-line in C, and -- in SQL .
(PYTHON) COMPREHENSIVE OA MASTER STUDY
GUIDE: QUESTIONS AND CORRECT ANSWERS
(VERIFIED ANSWERS) PLUS RATIONALES 2026
Q&A | INSTANT DOWNLOAD PDF
Core Domains:
Python Syntax and Structure
Variables, Data Types, and Operators
Conditional Statements and Control Flow
Loops (For and While)
Data Structures (Lists, Tuples, Dictionaries, Sets)
String Manipulation and Indexing
Functions and Scope
File I/O and Exception Handling
Debugging and Error Resolution
Applied Coding and Problem-Solving
This comprehensive study guide is designed to prepare students for the WGU E010
Foundations of Programming (Python) Objective Assessment. The examination
evaluates foundational programming knowledge, including syntax, data structures,
control flow, and problem-solving using Python. Questions are structured to assess
both theoretical understanding and practical coding skills, with an emphasis on
real-world application and critical thinking. Each question includes a verified
correct answer and a detailed rationale to reinforce learning and support exam
preparation. The guide reflects the most current 2026 curriculum standards for
WGU’s E010 course.
,SECTION ONE: QUESTIONS 1 – 100
Question 1
What is the correct output of the following Python code? print("Hello, World!")
A. Hello, World! (without quotes)
B. "Hello, World!" (with quotes)
C. print("Hello, World!")
D. An error occurs
A. Hello, World! (without quotes)
RATIONALE: The print() function outputs the string literal to the console
without the quotation marks. The quotes are used only to denote the string in the
code, not as part of the output .
Question 2
Which of the following is a valid variable name in Python?
A. 2nd_place
B. my_var
C. my-var
D. class
B. my_var
RATIONALE: Variable names must start with a letter or underscore, cannot
contain hyphens, and cannot be reserved keywords. "class" is a reserved keyword,
"2nd_place" starts with a digit, and "my-var" contains a hyphen .
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 .
Question 5
What is the result of 10 % 3?
A. 3.33
B. 1
C. 3
D. 0
B. 1
RATIONALE: The modulo operator % returns the remainder of a
division. 10 divided by 3 is 3 with a remainder of 1, so 10 % 3 = 1 .
Question 6
Which of the following data types is immutable?
, A. list
B. dict
C. set
D. tuple
D. tuple
RATIONALE: Tuples are immutable—once created, they cannot be changed.
Lists, dictionaries, and sets are mutable and can be modified after creation .
Question 7
What is the output of print(type())?
A. <class 'int'>
B. <class 'float'>
C. <class 'double'>
D. <class 'str'>
B. <class 'float'>
RATIONALE: In Python, the / operator performs true division and always
returns a float, even when the numbers divide evenly. evaluates to 5.0,
so type(5.0) is float .
Question 8
Which symbol begins a single-line comment in Python?
A. //
B. #
C. *
D. %
B. #
RATIONALE: The hash symbol (#) is used for single-line comments in
Python. // is used in C/Java, /* */ for multi-line in C, and -- in SQL .