WGU D335 OA Introduction to
Programming in Python Objective
Assessment Actual Questions with
Verified Answers New 2025/2026
Update 100% Correct.
1. What is the output?
x = 10
y=3
print(x + y)
A. 7
B. 13
C. 30
D. 103
Answer: B. 13
Rationale: The + operator adds the two integer values.
2. Which symbol is used for assignment in Python?
A. ==
B. !=
C. =
D. :=
Answer: C. =
Rationale: A single equals sign assigns a value to a variable. == tests equality.
3. What is the output?
,print(10 - 4)
A. 6
B. 14
C. -6
D. 40
Answer: A. 6
Rationale: Subtracting 4 from 10 produces 6.
4. What data type is 25?
A. str
B. float
C. bool
D. int
Answer: D. int
Rationale: Whole numbers without a decimal component are integers.
5. What data type is 25.0?
A. int
B. float
C. str
D. bool
Answer: B. float
Rationale: A number containing a decimal point is normally represented as a floating-point
value.
6. What is the output?
print()
A. 3
B. 3.0
C. 3.5
D. 4
,Answer: C. 3.5
Rationale: / performs true division and returns a floating-point result.
7. What is the output?
print(7 // 2)
A. 3
B. 3.5
C. 4
D. 1
Answer: A. 3
Rationale: // performs floor division. For these positive operands, the result is 3.
8. What is the output?
print(10 % 3)
A. 0
B. 1
C. 3
D. 3.33
Answer: B. 1
Rationale: % returns the remainder after division. Ten divided by three leaves a remainder of
one.
9. What is the output?
print(2 ** 3)
A. 5
B. 6
C. 8
D. 9
Answer: C. 8
Rationale: ** is the exponentiation operator: 2³ = 8.
, 10. Which expression checks whether x equals 10?
A. x = 10
B. x == 10
C. x != 10
D. x === 10
Answer: B. x == 10
Rationale: == compares two values for equality.
11. What is the output?
x=5
x += 3
print(x)
A. 3
B. 5
C. 8
D. 15
Answer: C. 8
Rationale: x += 3 is equivalent to x = x + 3.
12. What is the value of x?
x = 10
x -= 4
A. 4
B. 6
C. 10
D. 14
Answer: B. 6
Rationale: Subtracting four from ten leaves six.
Programming in Python Objective
Assessment Actual Questions with
Verified Answers New 2025/2026
Update 100% Correct.
1. What is the output?
x = 10
y=3
print(x + y)
A. 7
B. 13
C. 30
D. 103
Answer: B. 13
Rationale: The + operator adds the two integer values.
2. Which symbol is used for assignment in Python?
A. ==
B. !=
C. =
D. :=
Answer: C. =
Rationale: A single equals sign assigns a value to a variable. == tests equality.
3. What is the output?
,print(10 - 4)
A. 6
B. 14
C. -6
D. 40
Answer: A. 6
Rationale: Subtracting 4 from 10 produces 6.
4. What data type is 25?
A. str
B. float
C. bool
D. int
Answer: D. int
Rationale: Whole numbers without a decimal component are integers.
5. What data type is 25.0?
A. int
B. float
C. str
D. bool
Answer: B. float
Rationale: A number containing a decimal point is normally represented as a floating-point
value.
6. What is the output?
print()
A. 3
B. 3.0
C. 3.5
D. 4
,Answer: C. 3.5
Rationale: / performs true division and returns a floating-point result.
7. What is the output?
print(7 // 2)
A. 3
B. 3.5
C. 4
D. 1
Answer: A. 3
Rationale: // performs floor division. For these positive operands, the result is 3.
8. What is the output?
print(10 % 3)
A. 0
B. 1
C. 3
D. 3.33
Answer: B. 1
Rationale: % returns the remainder after division. Ten divided by three leaves a remainder of
one.
9. What is the output?
print(2 ** 3)
A. 5
B. 6
C. 8
D. 9
Answer: C. 8
Rationale: ** is the exponentiation operator: 2³ = 8.
, 10. Which expression checks whether x equals 10?
A. x = 10
B. x == 10
C. x != 10
D. x === 10
Answer: B. x == 10
Rationale: == compares two values for equality.
11. What is the output?
x=5
x += 3
print(x)
A. 3
B. 5
C. 8
D. 15
Answer: C. 8
Rationale: x += 3 is equivalent to x = x + 3.
12. What is the value of x?
x = 10
x -= 4
A. 4
B. 6
C. 10
D. 14
Answer: B. 6
Rationale: Subtracting four from ten leaves six.