WGU D335 Exam 2026/2027 Actual
Exam | 100% Correct Answers | Pass
Guaranteed - A+ Graded
Section 1: Python Fundamentals
Q1: What is the output of the following code?
python
x=5
y=2
print(x // y)
A. 2.5
B. 2 [CORRECT]
C. 3
D. 2.0
Correct Answer: B
Rationale: The // operator performs floor division (integer division), which returns the largest
integer less than or equal to the division result. 5 divided by 2 is 2.5, so the floor is 2. Option A is
the result of standard division (/). Option C is incorrect rounding. Option D would be the result
of standard division converted to int, but // returns an int type here.
Q2: Which of the following is a valid variable name in Python?
A. 2variable
B. variable-2
C. variable_2 [CORRECT]
D. variable 2
,2
Correct Answer: C
Rationale: Python variable names must start with a letter or an underscore, can only contain
alphanumeric characters and underscores, and cannot contain spaces or special characters like
hyphens. Option A starts with a number. Option B contains a hyphen. Option D contains a space.
Q3: What is the output of the following code?
python
print(type(3.14))
A. <class 'int'>
B. <class 'float'> [CORRECT]
C. <class 'str'>
D. <class 'double'>
Correct Answer: B
Rationale: 3.14 is a floating-point number. In Python, the type for floating-point numbers is float.
Option A is for integers. Option C is for strings. Option D is a data type found in other languages
like C++ or Java, but not Python.
Q4: What is the output of the following code?
python
x = "10"
y=5
print(int(x) + y)
A. 15 [CORRECT]
,3
B. 105
C. "105"
D. Error
Correct Answer: A
Rationale: int(x) converts the string "10" to the integer 10. Then 10 + 5 equals 15. Option B
would occur if concatenation happened, but they are integers. Option C is a string representation.
Option D would occur if conversion was not performed.
Q5: Which operator is used for exponentiation (power) in Python?
A. ^
B. ** [CORRECT]
C. //
D. %
Correct Answer: B
Rationale: The ** operator is used for exponentiation in Python (e.g., 2**3 = 8). Option A (^) is
the bitwise XOR operator. Option C (//) is floor division. Option D (%) is the modulus operator.
Q6: What is the value of result after the following code runs?
python
x = 10
y=3
result = x % y
A. 1 [CORRECT]
B. 3
, 4
C. 3.33
D. 0
Correct Answer: A
Rationale: The % operator is the modulus operator, which returns the remainder of the division.
10 divided by 3 is 3 with a remainder of 1. Option B is the divisor. Option C is the approximate
quotient. Option D is incorrect.
Q7: What is the output of this code?
python
print(5 == "5")
A. True
B. False [CORRECT]
C. Error
D. 5
Correct Answer: B
Rationale: The == operator checks for equality. An integer 5 and a string "5" are different data
types, so they are not equal. Python does not coerce types for the == comparison in this context.
Q8: Which function is used to get user input from the console?
A. print()
B. input() [CORRECT]
C. scan()
D. read()