WGU E011 FOUNDATIONS OF PROGRAMMING (PYTHON) OA EXAM
2026-2027 WGU E010 FOUNDATIONS OF
PROGRAMMING OA (PYTHON) EXAM EXPERT
SOLVED QUESTIONS WITH CORRECT
ANSWERS AND RATIONALES. A+ GRADE
ASSURED
Q1. What is the output of the following code?
print(type(10/2))
A. int
ANSWER IS ✔✔ B. float
C. double
D. str
Explanation:
In Python, division / always returns a float, even if both numbers divide evenly. So 10/2 = 5.0,
type is float.
Q2. Which data type is immutable?
A. list
B. dict
C. set
ANSWER IS ✔✔ D. tuple
Explanation:
Tuples cannot be changed after creation, making them immutable.
Q3. What will this print?
x = "Hello"
print(x[1])
A. H
ANSWER IS ✔✔ B. e
,WGU E011 FOUNDATIONS OF PROGRAMMING (PYTHON) OA EXAM
C. l
D. o
Explanation:
Indexing starts at 0 → H(0), e(1).
Q4. What is output?
print(2 ** 3)
A. 6
ANSWER IS ✔✔ B. 8
C. 9
D. 5
Explanation:
** means exponent → 2³ = 8.
Q5. Which loop is used when number of iterations is
unknown?
A. for loop
ANSWER IS ✔✔ B. while loop
C. nested loop
D. foreach loop
Explanation:
while loops run until a condition becomes false.
Q6. What does break do?
A. Skips one iteration
ANSWER IS ✔✔ B. Exits loop completely
C. Restarts loop
D. Stops program
Explanation:
break immediately terminates the loop.
, WGU E011 FOUNDATIONS OF PROGRAMMING (PYTHON) OA EXAM
Q7. What is output?
print(bool(""))
A. True
ANSWER IS ✔✔ B. False
C. None
D. Error
Explanation:
Empty strings are falsy in Python.
Q8. What is correct function definition syntax?
A. function myFunc():
ANSWER IS ✔✔ B. def myFunc():
C. define myFunc():
D. func myFunc():
Explanation:
Python uses def keyword.
Q9. What is output?
def add(x, y=5):
return x + y
print(add(3))
ANSWER IS ✔✔ A. 8
B. 3
C. 5
D. Error
Explanation:
Default parameter y = 5 → 3 + 5 = 8.
2026-2027 WGU E010 FOUNDATIONS OF
PROGRAMMING OA (PYTHON) EXAM EXPERT
SOLVED QUESTIONS WITH CORRECT
ANSWERS AND RATIONALES. A+ GRADE
ASSURED
Q1. What is the output of the following code?
print(type(10/2))
A. int
ANSWER IS ✔✔ B. float
C. double
D. str
Explanation:
In Python, division / always returns a float, even if both numbers divide evenly. So 10/2 = 5.0,
type is float.
Q2. Which data type is immutable?
A. list
B. dict
C. set
ANSWER IS ✔✔ D. tuple
Explanation:
Tuples cannot be changed after creation, making them immutable.
Q3. What will this print?
x = "Hello"
print(x[1])
A. H
ANSWER IS ✔✔ B. e
,WGU E011 FOUNDATIONS OF PROGRAMMING (PYTHON) OA EXAM
C. l
D. o
Explanation:
Indexing starts at 0 → H(0), e(1).
Q4. What is output?
print(2 ** 3)
A. 6
ANSWER IS ✔✔ B. 8
C. 9
D. 5
Explanation:
** means exponent → 2³ = 8.
Q5. Which loop is used when number of iterations is
unknown?
A. for loop
ANSWER IS ✔✔ B. while loop
C. nested loop
D. foreach loop
Explanation:
while loops run until a condition becomes false.
Q6. What does break do?
A. Skips one iteration
ANSWER IS ✔✔ B. Exits loop completely
C. Restarts loop
D. Stops program
Explanation:
break immediately terminates the loop.
, WGU E011 FOUNDATIONS OF PROGRAMMING (PYTHON) OA EXAM
Q7. What is output?
print(bool(""))
A. True
ANSWER IS ✔✔ B. False
C. None
D. Error
Explanation:
Empty strings are falsy in Python.
Q8. What is correct function definition syntax?
A. function myFunc():
ANSWER IS ✔✔ B. def myFunc():
C. define myFunc():
D. func myFunc():
Explanation:
Python uses def keyword.
Q9. What is output?
def add(x, y=5):
return x + y
print(add(3))
ANSWER IS ✔✔ A. 8
B. 3
C. 5
D. Error
Explanation:
Default parameter y = 5 → 3 + 5 = 8.