WGU E010 OBJECTIVE ASSESSMENT FINAL ACTUAL
EXAM AND PRACTICE QUESTIONS AND SOLUTIONS
Section 1: Basic Syntax & Data Types (Q1-15)
Q1. What is the output of print(type(10/2))?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'str'>
Answer: B
Rationale: In Python, the / operator performs true division and always returns a float,
even when the numbers divide evenly (10/2 = 5.0).
Q2. Which of the following data types is immutable?
A) list
B) dict
C) set
D) tuple
Answer: D
Rationale: A tuple cannot be changed after creation (immutable). Lists, dictionaries, and
sets are mutable and can be modified after creation.
,Q3. What will the following code print?
python
x = "Hello"
print(x[1])
A) H
B) e
C) l
D) o
Answer: B
Rationale: Strings are zero-indexed. Index 0 → 'H', index 1 → 'e'.
Q4. What is the output of print(2 ** 3)?
A) 6
B) 8
C) 9
D) 5
Answer: B
Rationale: The ** operator is the exponentiation operator. 2 ** 3 means 2 raised to the
power of 3, which is 2 × 2 × 2 = 8.
Q5. Which loop is best used when the number of iterations is unknown?
A) for loop
,B) while loop
C) nested loop
D) for-each loop
Answer: B
Rationale: A while loop runs until a condition becomes False, making it ideal when the
number of iterations is not known in advance.
Q6. What does the break statement do in a loop?
A) Skips the current iteration
B) Exits the loop completely
C) Restarts the loop from the beginning
D) Pauses the loop temporarily
Answer: B
Rationale: The break statement immediately terminates the entire loop, and execution
continues with the first statement after the loop.
Q7. What is the output of print("Python"[::-1])?
A) Python
B) nohtyP
C) nohtyp
D) Error
Answer: B
Rationale: [::-1] is a slicing syntax that reverses the string. It starts from the end and
moves backward, producing "nohtyP".
, Q8. Which keyword is used to define a function in Python?
A) function
B) def
C) define
D) func
Answer: B
Rationale: The def keyword is used to define a function in Python.
Q9. What is the output of print(3 == 3.0)?
A) False
B) True
C) TypeError
D) None
Answer: B
Rationale: Python compares values, not types. 3 (int) and 3.0 (float) are numerically
equal, so the expression returns True.
Q10. What is the value of 10 % 3?
A) 1
B) 2
C) 3
D) 0
EXAM AND PRACTICE QUESTIONS AND SOLUTIONS
Section 1: Basic Syntax & Data Types (Q1-15)
Q1. What is the output of print(type(10/2))?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'str'>
Answer: B
Rationale: In Python, the / operator performs true division and always returns a float,
even when the numbers divide evenly (10/2 = 5.0).
Q2. Which of the following data types is immutable?
A) list
B) dict
C) set
D) tuple
Answer: D
Rationale: A tuple cannot be changed after creation (immutable). Lists, dictionaries, and
sets are mutable and can be modified after creation.
,Q3. What will the following code print?
python
x = "Hello"
print(x[1])
A) H
B) e
C) l
D) o
Answer: B
Rationale: Strings are zero-indexed. Index 0 → 'H', index 1 → 'e'.
Q4. What is the output of print(2 ** 3)?
A) 6
B) 8
C) 9
D) 5
Answer: B
Rationale: The ** operator is the exponentiation operator. 2 ** 3 means 2 raised to the
power of 3, which is 2 × 2 × 2 = 8.
Q5. Which loop is best used when the number of iterations is unknown?
A) for loop
,B) while loop
C) nested loop
D) for-each loop
Answer: B
Rationale: A while loop runs until a condition becomes False, making it ideal when the
number of iterations is not known in advance.
Q6. What does the break statement do in a loop?
A) Skips the current iteration
B) Exits the loop completely
C) Restarts the loop from the beginning
D) Pauses the loop temporarily
Answer: B
Rationale: The break statement immediately terminates the entire loop, and execution
continues with the first statement after the loop.
Q7. What is the output of print("Python"[::-1])?
A) Python
B) nohtyP
C) nohtyp
D) Error
Answer: B
Rationale: [::-1] is a slicing syntax that reverses the string. It starts from the end and
moves backward, producing "nohtyP".
, Q8. Which keyword is used to define a function in Python?
A) function
B) def
C) define
D) func
Answer: B
Rationale: The def keyword is used to define a function in Python.
Q9. What is the output of print(3 == 3.0)?
A) False
B) True
C) TypeError
D) None
Answer: B
Rationale: Python compares values, not types. 3 (int) and 3.0 (float) are numerically
equal, so the expression returns True.
Q10. What is the value of 10 % 3?
A) 1
B) 2
C) 3
D) 0