1
WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON
) ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS
LATEST 2026 .
Question 1: Data Types
What is the output of print(type(10/2))?
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>
Correct Answer: B – <class 'float'>
Rationale: In Python 3, the / operator always returns a float, even when the result
is a whole number.
Question 2: Operators
What is the result of print(10 // 3)?
A. 3.33
B. 3
C. 4
D. 3.0
Correct Answer: B – 3
Rationale: The // operator performs floor division, returning the integer quotient
rounded down to the nearest whole number.
Question 3: Data Types
pg. 1
,2
Which data type is immutable in Python?
A. List
B. Dictionary
C. Tuple
D. Set
Correct Answer: C – Tuple
Rationale: Tuples are immutable, meaning they cannot be changed after creation.
Lists, dictionaries, and sets are mutable.
Question 4: String Slicing
How can the first four characters be extracted from the string 'computer'?
A. 'computer'[0:4]
B. 'computer'[:4]
C. 'computer'[1:4]
D. Both A and B
Correct Answer: D – Both A and B
Rationale: Both 'computer'[0:4] and 'computer'[:4] will return 'comp'.
Question 5: Basic Syntax
What is the output of the following code?
python
x=5
y = 10
print(x + y)
A. 510
B. 15
pg. 2
,3
C. Error
D. 5 10
Correct Answer: B – 15
Rationale: The + operator performs addition on integers, returning 15.
Question 6: For Loops
What must follow the in keyword in a for loop when iterating a specific number of
times?
A. A list
B. A range
C. A string
D. A dictionary
Correct Answer: B – A range
Rationale: The range() function is used to generate a sequence of numbers for
iteration in a for loop.
Question 7: Code Output
What is the correct output of the following code?
python
print("Hello, World!")
A. Hello, World!
B. "Hello, World!"
C. Error
D. Hello
Correct Answer: A – Hello, World!
Rationale: The print() function outputs the string without the quotation marks.
pg. 3
, 4
Question 8
What is the output of print(type())?
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>
Correct Answer: B – <class 'float'>
Rationale: In Python 3, the / operator always returns a float, even when the result
is a whole number.
Question 9
What is the result of print(10 // 3)?
A. 3.33
B. 3
C. 4
D. 3.0
Correct Answer: B – 3
Rationale: The // operator performs floor division, returning the integer quotient
rounded down to the nearest whole number.
Question 10
Which of the following data types is immutable in Python?
A. List
B. Dictionary
C. Tuple
D. Set
Correct Answer: C – Tuple
pg. 4
WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON
) ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS
LATEST 2026 .
Question 1: Data Types
What is the output of print(type(10/2))?
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>
Correct Answer: B – <class 'float'>
Rationale: In Python 3, the / operator always returns a float, even when the result
is a whole number.
Question 2: Operators
What is the result of print(10 // 3)?
A. 3.33
B. 3
C. 4
D. 3.0
Correct Answer: B – 3
Rationale: The // operator performs floor division, returning the integer quotient
rounded down to the nearest whole number.
Question 3: Data Types
pg. 1
,2
Which data type is immutable in Python?
A. List
B. Dictionary
C. Tuple
D. Set
Correct Answer: C – Tuple
Rationale: Tuples are immutable, meaning they cannot be changed after creation.
Lists, dictionaries, and sets are mutable.
Question 4: String Slicing
How can the first four characters be extracted from the string 'computer'?
A. 'computer'[0:4]
B. 'computer'[:4]
C. 'computer'[1:4]
D. Both A and B
Correct Answer: D – Both A and B
Rationale: Both 'computer'[0:4] and 'computer'[:4] will return 'comp'.
Question 5: Basic Syntax
What is the output of the following code?
python
x=5
y = 10
print(x + y)
A. 510
B. 15
pg. 2
,3
C. Error
D. 5 10
Correct Answer: B – 15
Rationale: The + operator performs addition on integers, returning 15.
Question 6: For Loops
What must follow the in keyword in a for loop when iterating a specific number of
times?
A. A list
B. A range
C. A string
D. A dictionary
Correct Answer: B – A range
Rationale: The range() function is used to generate a sequence of numbers for
iteration in a for loop.
Question 7: Code Output
What is the correct output of the following code?
python
print("Hello, World!")
A. Hello, World!
B. "Hello, World!"
C. Error
D. Hello
Correct Answer: A – Hello, World!
Rationale: The print() function outputs the string without the quotation marks.
pg. 3
, 4
Question 8
What is the output of print(type())?
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. <class 'bool'>
Correct Answer: B – <class 'float'>
Rationale: In Python 3, the / operator always returns a float, even when the result
is a whole number.
Question 9
What is the result of print(10 // 3)?
A. 3.33
B. 3
C. 4
D. 3.0
Correct Answer: B – 3
Rationale: The // operator performs floor division, returning the integer quotient
rounded down to the nearest whole number.
Question 10
Which of the following data types is immutable in Python?
A. List
B. Dictionary
C. Tuple
D. Set
Correct Answer: C – Tuple
pg. 4