WGU E010 Foundations of Programming
(Python) – 2026 UPDATED OA 100
Questions & Answers GUARANTEED
PASS Study Guide.
1. Which symbol begins a single-line comment in Python?
A. //
B. #
C. <!--
D. /*
Answer: B. #
Rationale: Python uses # to indicate that the remainder of the line is a comment.
2. What is the output?
x=5
y=3
print(x + y)
A. 2
B. 8
C. 15
D. 53
Answer: B. 8
Rationale: The + operator performs numeric addition when both operands are integers.
3. Which is a valid Python variable name?
A. 2value
B. my-value
,C. my_value
D. class
Answer: C. my_value
Rationale: Variable names cannot begin with a digit or contain a hyphen. Python keywords such
as class cannot be used as ordinary variable names.
4. What data type is produced by the following expression?
x = 10
A. str
B. float
C. int
D. bool
Answer: C. int
Rationale: 10 is an integer literal.
5. Which function displays output to the screen?
A. input()
B. display()
C. output()
D. print()
Answer: D. print()
Rationale: Python's built-in print() function sends values to standard output.
6. What does input() normally return?
A. An integer
B. A Boolean
C. A string
D. A list
Answer: C. A string
,Rationale: User input is returned as a string unless it is explicitly converted to another type.
7. What is the result?
x = "5"
y = "2"
print(x + y)
A. 7
B. 52
C. 10
D. Error
Answer: B. 52
Rationale: Both values are strings, so + concatenates them.
8. Which function converts a string to an integer when possible?
A. str()
B. float()
C. int()
D. bool()
Answer: C. int()
Rationale: int("25") produces the integer 25.
9. What is the output?
print()
A. 5
B. 5.0
C. 10
D. 2
Answer: B. 5.0
Rationale: / performs true division and returns a floating-point result.
, 10. Which operator performs floor division?
A. /
B. %
C. //
D. **
Answer: C. //
Rationale: // divides and rounds the result down to the nearest integer boundary.
11. What is 17 % 5?
A. 2
B. 3
C. 5
D. 12
Answer: A. 2
Rationale: % returns the remainder after division. Seventeen divided by five leaves a remainder
of two.
12. Which operator calculates an exponent?
A. ^
B. **
C. //
D. %%
Answer: B. **
Rationale: Python uses ** for exponentiation.
13. What is the value of 2 ** 3?
A. 5
B. 6
(Python) – 2026 UPDATED OA 100
Questions & Answers GUARANTEED
PASS Study Guide.
1. Which symbol begins a single-line comment in Python?
A. //
B. #
C. <!--
D. /*
Answer: B. #
Rationale: Python uses # to indicate that the remainder of the line is a comment.
2. What is the output?
x=5
y=3
print(x + y)
A. 2
B. 8
C. 15
D. 53
Answer: B. 8
Rationale: The + operator performs numeric addition when both operands are integers.
3. Which is a valid Python variable name?
A. 2value
B. my-value
,C. my_value
D. class
Answer: C. my_value
Rationale: Variable names cannot begin with a digit or contain a hyphen. Python keywords such
as class cannot be used as ordinary variable names.
4. What data type is produced by the following expression?
x = 10
A. str
B. float
C. int
D. bool
Answer: C. int
Rationale: 10 is an integer literal.
5. Which function displays output to the screen?
A. input()
B. display()
C. output()
D. print()
Answer: D. print()
Rationale: Python's built-in print() function sends values to standard output.
6. What does input() normally return?
A. An integer
B. A Boolean
C. A string
D. A list
Answer: C. A string
,Rationale: User input is returned as a string unless it is explicitly converted to another type.
7. What is the result?
x = "5"
y = "2"
print(x + y)
A. 7
B. 52
C. 10
D. Error
Answer: B. 52
Rationale: Both values are strings, so + concatenates them.
8. Which function converts a string to an integer when possible?
A. str()
B. float()
C. int()
D. bool()
Answer: C. int()
Rationale: int("25") produces the integer 25.
9. What is the output?
print()
A. 5
B. 5.0
C. 10
D. 2
Answer: B. 5.0
Rationale: / performs true division and returns a floating-point result.
, 10. Which operator performs floor division?
A. /
B. %
C. //
D. **
Answer: C. //
Rationale: // divides and rounds the result down to the nearest integer boundary.
11. What is 17 % 5?
A. 2
B. 3
C. 5
D. 12
Answer: A. 2
Rationale: % returns the remainder after division. Seventeen divided by five leaves a remainder
of two.
12. Which operator calculates an exponent?
A. ^
B. **
C. //
D. %%
Answer: B. **
Rationale: Python uses ** for exponentiation.
13. What is the value of 2 ** 3?
A. 5
B. 6