WGU E010 FOUNDATIONS OF
PROGRAMMING (PYTHON) OA 2026
PRACTICE EXAM COMPLETE (100) CURRENT
TESTING QUESTIONS AND CORRECT
ANSWERS WITH DETAILED
EXPLANATIONS|GUARANTEED PASS.
PYTHON
Ace the WGU E010 Foundations of Programming (Python) OA practice
Exam with practice questions covering Python syntax, data types,
control structures, functions, data structures (lists, tuples,
dictionaries, sets), file I/O, exception handling, modules, and basic
object-oriented programming. This study guide helps reinforce
foundational coding concepts and supports effective preparation for
objective assessments. Designed to improve problem-solving skills
and boost confidence in Python programming. Suitable for computer
science, IT, and programming students.
Multiple choice.
Section 1: Python Fundamentals & Syntax (Questions 1–15)
1. What is the correct output of the following Python code?
print("Hello, World!")
A) Hello, World!
B) Hello, World!
, Page 2 of 44
C) print("Hello, World!")
D) An error occurs
Answer: A. Hello, World!
Explanation: The print() function outputs the string literal to
the console without the quotation marks. The quotes are
used only to denote the string.
2. Which of the following is a valid variable name in Python?
A) 2_variable
B) my-variable
C) _myVariable
D) my variable
Answer: C. _myVariable
Explanation: Variable names can start with a letter or
underscore, cannot start with a digit, and cannot contain
spaces or hyphens. Underscore is allowed.
3. In Python, which symbol is used for single-line
comments?
A) //
B) #
C) /*
D) <!--
Answer: B. #
Explanation: The hash character # indicates a single-line
comment. Everything after it on the same line is ignored by
the interpreter.
, Page 3 of 44
4. What is the data type of x = 5.0?
A) int
B) float
C) str
D) complex
Answer: B. float
Explanation: The presence of a decimal point makes the
literal a floating-point number, even if the value is a whole
number.
5. Which of the following statements correctly assigns the
integer value 10 to a variable named count?
A) 10 = count
B) count = 10
C) count == 10
D) int count = 10
Answer: B. count = 10
Explanation: Assignment uses the = operator with the
variable on the left and the value on the right. Type
declarations are not used in Python.
6. What is the output of print(type(3.14))?
A) <class 'int'>
B) <class 'float'>
C) <class 'str'>
D) <class 'decimal'>
, Page 4 of 44
Answer: B. <class 'float'>
Explanation: type() returns the class of the object. 3.14 is a
floating-point number, so the output indicates a float class.
7. Which operator is used for exponentiation (power) in
Python?
A) ^
B) **
C) *
D) //
Answer: B. **
Explanation: ** is the exponentiation operator (e.g., 2 **
3 equals 8). The ^ operator is used for bitwise XOR.
8. What is the result of 17 // 5 in Python?
A) 3.4
B) 3
C) 4
D) 3.0
Answer: B. 3
Explanation: // is the floor division operator; it returns the
integer quotient, discarding the remainder (17 // 5 = 3).
9. What is the output of print(10 % 3)?
A) 3.33
B) 1
C) 3
D) 10