WGU E010 Objective Assessment (OA) exam Foundations of Programming (Python)
WGU E010 OBJECTIVE ASSESSMENT
(OA) EXAM FOUNDATIONS OF
PROGRAMMING (PYTHON) QUESTION
AND ANSWERS WITH RATIONALES
Q1
What is the value of x?
x = 4 + 3 * 2
A. 14
B. 10
C. 11
D. 7
Answer: B
Rationale: Multiplication occurs before addition. 3*2=6; 4+6=10.
Q2
Which data type stores whole numbers?
A. float
B. str
C. int
D. bool
Answer: C
Rationale: Integers represent whole numbers.
Q3
What is printed?
,WGU E010 Objective Assessment (OA) exam Foundations of Programming (Python)
print("5" + "3")
A. 8
B. 53
C. Error
D. 5 3
Answer: B
Rationale: String concatenation joins strings.
Q4
Which operator means "not equal"?
A. =
B. ==
C. !=
D. <>
Answer: C
Rationale: != compares inequality.
Q5
What is the output?
x = 10
if x > 5:
print("A")
A. A
B. B
C. Error
D. Nothing
Answer: A
Rationale: Condition evaluates True.
, WGU E010 Objective Assessment (OA) exam Foundations of Programming (Python)
Q6
Which keyword starts a function?
A. function
B. func
C. define
D. def
Answer: D
Rationale: Python uses def.
Q7
What is printed?
for i in range(3):
print(i)
A. 1 2 3
B. 0 1 2
C. 0 1 2 3
D. 3
Answer: B
Rationale: Range starts at 0 and excludes 3.
Q8
Which collection is mutable?
A. tuple
B. string
C. list
D. int
Answer: C
Rationale: Lists can be modified.
WGU E010 OBJECTIVE ASSESSMENT
(OA) EXAM FOUNDATIONS OF
PROGRAMMING (PYTHON) QUESTION
AND ANSWERS WITH RATIONALES
Q1
What is the value of x?
x = 4 + 3 * 2
A. 14
B. 10
C. 11
D. 7
Answer: B
Rationale: Multiplication occurs before addition. 3*2=6; 4+6=10.
Q2
Which data type stores whole numbers?
A. float
B. str
C. int
D. bool
Answer: C
Rationale: Integers represent whole numbers.
Q3
What is printed?
,WGU E010 Objective Assessment (OA) exam Foundations of Programming (Python)
print("5" + "3")
A. 8
B. 53
C. Error
D. 5 3
Answer: B
Rationale: String concatenation joins strings.
Q4
Which operator means "not equal"?
A. =
B. ==
C. !=
D. <>
Answer: C
Rationale: != compares inequality.
Q5
What is the output?
x = 10
if x > 5:
print("A")
A. A
B. B
C. Error
D. Nothing
Answer: A
Rationale: Condition evaluates True.
, WGU E010 Objective Assessment (OA) exam Foundations of Programming (Python)
Q6
Which keyword starts a function?
A. function
B. func
C. define
D. def
Answer: D
Rationale: Python uses def.
Q7
What is printed?
for i in range(3):
print(i)
A. 1 2 3
B. 0 1 2
C. 0 1 2 3
D. 3
Answer: B
Rationale: Range starts at 0 and excludes 3.
Q8
Which collection is mutable?
A. tuple
B. string
C. list
D. int
Answer: C
Rationale: Lists can be modified.