WGU E010 Foundations of Programming (Python) Objective Assessment | OA V1 and V2 |
200 Practice Questions and Answers | 2026 Study Guide | 100% Correct.
Questions 1–20: Python Foundations and Data Types
1. Which statement correctly assigns the integer 25 to a variable?
A. 25 = age
B. age == 25
C. age = 25
D. int age = 25
Answer: C
Rationale: Python uses the assignment operator = to store a value in a variable. Python does not
require a type declaration such as int.
2. What is the data type of result?
result =
A. int
B. float
C. str
D. bool
Answer: B
Rationale: The / operator always performs floating-point division in Python 3. The result is 5.0,
which is a float.
3. What does the following code display?
print(type("42"))
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. 42
,Answer: C
Rationale: Quotation marks create a string. Although the characters represent a number, "42"
has the str data type.
4. Which variable name is valid in Python?
A. 2total
B. total-cost
C. class
D. total_cost
Answer: D
Rationale: Variable names can contain letters, digits, and underscores, but cannot begin with a
digit or use a reserved keyword. A hyphen is interpreted as subtraction.
5. What is displayed?
x = 7
y = 2
print(x // y)
A. 3
B. 3.5
C. 4
D. 1
Answer: A
Rationale: // performs floor division. It returns the whole-number quotient after rounding
down, so 7 // 2 is 3.
6. What is the value of remainder?
remainder = 17 % 5
A. 2
B. 3
,C. 3.4
D. 12
Answer: A
Rationale: The modulo operator % returns the remainder. Dividing 17 by 5 produces a remainder
of 2.
7. What does 2 ** 4 evaluate to?
A. 6
B. 8
C. 16
D. 24
Answer: C
Rationale: ** is the exponentiation operator. Therefore, 2 ** 4 means (2^4), which equals 16.
8. Which function converts "3.75" to a floating-point value?
A. int("3.75")
B. float("3.75")
C. str("3.75")
D. bool("3.75")
Answer: B
Rationale: float() converts a compatible numeric string into a floating-point number.
9. What does the following code display?
value = int(8.9)
print(value)
A. 8
B. 9
C. 8.9
D. An error
, Answer: A
Rationale: Converting a float to an integer removes the fractional portion. It does not round the
number.
10. What is displayed?
first = "Cloud"
second = "Computing"
print(first + " " + second)
A. CloudComputing
B. Cloud Computing
C. Cloud + Computing
D. An error
Answer: B
Rationale: The + operator concatenates strings. The separate " " string inserts a space.
11. Which value is Boolean?
A. "False"
B. 0.0
C. False
D. "True"
Answer: C
Rationale: False without quotation marks is a Boolean literal. Values inside quotation marks
are strings.
12. What is the result of this expression?
5 + 3 * 2
A. 16
B. 11
C. 13
D. 10
200 Practice Questions and Answers | 2026 Study Guide | 100% Correct.
Questions 1–20: Python Foundations and Data Types
1. Which statement correctly assigns the integer 25 to a variable?
A. 25 = age
B. age == 25
C. age = 25
D. int age = 25
Answer: C
Rationale: Python uses the assignment operator = to store a value in a variable. Python does not
require a type declaration such as int.
2. What is the data type of result?
result =
A. int
B. float
C. str
D. bool
Answer: B
Rationale: The / operator always performs floating-point division in Python 3. The result is 5.0,
which is a float.
3. What does the following code display?
print(type("42"))
A. <class 'int'>
B. <class 'float'>
C. <class 'str'>
D. 42
,Answer: C
Rationale: Quotation marks create a string. Although the characters represent a number, "42"
has the str data type.
4. Which variable name is valid in Python?
A. 2total
B. total-cost
C. class
D. total_cost
Answer: D
Rationale: Variable names can contain letters, digits, and underscores, but cannot begin with a
digit or use a reserved keyword. A hyphen is interpreted as subtraction.
5. What is displayed?
x = 7
y = 2
print(x // y)
A. 3
B. 3.5
C. 4
D. 1
Answer: A
Rationale: // performs floor division. It returns the whole-number quotient after rounding
down, so 7 // 2 is 3.
6. What is the value of remainder?
remainder = 17 % 5
A. 2
B. 3
,C. 3.4
D. 12
Answer: A
Rationale: The modulo operator % returns the remainder. Dividing 17 by 5 produces a remainder
of 2.
7. What does 2 ** 4 evaluate to?
A. 6
B. 8
C. 16
D. 24
Answer: C
Rationale: ** is the exponentiation operator. Therefore, 2 ** 4 means (2^4), which equals 16.
8. Which function converts "3.75" to a floating-point value?
A. int("3.75")
B. float("3.75")
C. str("3.75")
D. bool("3.75")
Answer: B
Rationale: float() converts a compatible numeric string into a floating-point number.
9. What does the following code display?
value = int(8.9)
print(value)
A. 8
B. 9
C. 8.9
D. An error
, Answer: A
Rationale: Converting a float to an integer removes the fractional portion. It does not round the
number.
10. What is displayed?
first = "Cloud"
second = "Computing"
print(first + " " + second)
A. CloudComputing
B. Cloud Computing
C. Cloud + Computing
D. An error
Answer: B
Rationale: The + operator concatenates strings. The separate " " string inserts a space.
11. Which value is Boolean?
A. "False"
B. 0.0
C. False
D. "True"
Answer: C
Rationale: False without quotation marks is a Boolean literal. Values inside quotation marks
are strings.
12. What is the result of this expression?
5 + 3 * 2
A. 16
B. 11
C. 13
D. 10