WGU E010 Objective Assessment Final Exam
Questions And Answers Practice Questions with
Solutions Newest | Already Graded A+
SECTION 1: PYTHON FUNDAMENTALS & SYNTAX
1. What is the correct output of the following Python code?
python
print("Hello, World!")
A) Hello, World! (with quotes)
B) Hello, World! (without quotes)
C) print("Hello, World!")
D) An error occurs
Answer: B) Hello, World! (without quotes)
Rationale: The print() function outputs the string literal to the console without the
quotation marks. The quotes are used only to denote the string in the code .
2. Which of the following is a valid variable name in Python?
A) 2_variable
B) my-variable
C) _myVariable
D) my variable
Answer: C) _myVariable
Rationale: Variable names can start with a letter or underscore, cannot start with
a digit, and cannot contain spaces or hyphens. _myVariable follows all these rules .
,3. Which symbol begins a single-line comment in Python?
A) // (double forward slash)
B) # (pound symbol)
C) * (asterisk)
D) % (percent symbol)
Answer: B) # (pound symbol)
Rationale: The # symbol begins a single-line comment in Python. Everything after
the # on that line is ignored by the interpreter .
4. Which data type is the value 3.14 in Python?
A) int
B) float
C) str
D) bool
Answer: B) float
Rationale: Any number with a decimal point is a float (floating-point number) in
Python. Whole numbers without a decimal point are integers (int) .
5. What is the output of type()?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'number'>
Answer: B) <class 'float'>
Rationale: The / operator performs true division and always returns a float, even
when the numbers divide evenly (e.g., 10/2 = 5.0). The type() function confirms the
result is a float .
,6. Which of the following is a Boolean value in Python?
A) "True"
B) true
C) True
D) 1
Answer: C) True
Rationale: Python's Boolean values are True and False (capitalized). "True" is a
string, true is not a valid keyword (case matters), and 1 is an integer that
evaluates to True in a Boolean context but is not itself a Boolean .
7. What is the output of bool(0)?
A) True
B) False
C) 0
D) Error
Answer: B) False
Rationale: In Python, 0 is considered False when converted to a Boolean. Any non-
zero number (positive or negative) is considered True .
8. What is the output of bool("") (empty string)?
A) True
B) False
C) Error
D) None
Answer: B) False
, Rationale: Empty containers (lists, dicts, sets, tuples, strings) evaluate to False in a
Boolean context. Non-empty containers are True .
9. Which data type is immutable in Python?
A) list
B) dict
C) set
D) tuple
Answer: D) tuple
Rationale: A tuple cannot be changed after creation (immutable). Lists,
dictionaries, and sets are mutable and can be modified after creation .
10. What is the output of print(2 ** 3)?
A) 6
B) 8
C) 9
D) 5
Answer: B) 8
Rationale: The ** operator is the exponentiation operator. 2 ** 3 means 2 raised
to the power of 3, which is 2 * 2 * 2 = 8 .
11. What is the output of print(10 // 3)?
A) 3.333...
B) 3
C) 4
D) 3.0
Answer: B) 3
Questions And Answers Practice Questions with
Solutions Newest | Already Graded A+
SECTION 1: PYTHON FUNDAMENTALS & SYNTAX
1. What is the correct output of the following Python code?
python
print("Hello, World!")
A) Hello, World! (with quotes)
B) Hello, World! (without quotes)
C) print("Hello, World!")
D) An error occurs
Answer: B) Hello, World! (without quotes)
Rationale: The print() function outputs the string literal to the console without the
quotation marks. The quotes are used only to denote the string in the code .
2. Which of the following is a valid variable name in Python?
A) 2_variable
B) my-variable
C) _myVariable
D) my variable
Answer: C) _myVariable
Rationale: Variable names can start with a letter or underscore, cannot start with
a digit, and cannot contain spaces or hyphens. _myVariable follows all these rules .
,3. Which symbol begins a single-line comment in Python?
A) // (double forward slash)
B) # (pound symbol)
C) * (asterisk)
D) % (percent symbol)
Answer: B) # (pound symbol)
Rationale: The # symbol begins a single-line comment in Python. Everything after
the # on that line is ignored by the interpreter .
4. Which data type is the value 3.14 in Python?
A) int
B) float
C) str
D) bool
Answer: B) float
Rationale: Any number with a decimal point is a float (floating-point number) in
Python. Whole numbers without a decimal point are integers (int) .
5. What is the output of type()?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'number'>
Answer: B) <class 'float'>
Rationale: The / operator performs true division and always returns a float, even
when the numbers divide evenly (e.g., 10/2 = 5.0). The type() function confirms the
result is a float .
,6. Which of the following is a Boolean value in Python?
A) "True"
B) true
C) True
D) 1
Answer: C) True
Rationale: Python's Boolean values are True and False (capitalized). "True" is a
string, true is not a valid keyword (case matters), and 1 is an integer that
evaluates to True in a Boolean context but is not itself a Boolean .
7. What is the output of bool(0)?
A) True
B) False
C) 0
D) Error
Answer: B) False
Rationale: In Python, 0 is considered False when converted to a Boolean. Any non-
zero number (positive or negative) is considered True .
8. What is the output of bool("") (empty string)?
A) True
B) False
C) Error
D) None
Answer: B) False
, Rationale: Empty containers (lists, dicts, sets, tuples, strings) evaluate to False in a
Boolean context. Non-empty containers are True .
9. Which data type is immutable in Python?
A) list
B) dict
C) set
D) tuple
Answer: D) tuple
Rationale: A tuple cannot be changed after creation (immutable). Lists,
dictionaries, and sets are mutable and can be modified after creation .
10. What is the output of print(2 ** 3)?
A) 6
B) 8
C) 9
D) 5
Answer: B) 8
Rationale: The ** operator is the exponentiation operator. 2 ** 3 means 2 raised
to the power of 3, which is 2 * 2 * 2 = 8 .
11. What is the output of print(10 // 3)?
A) 3.333...
B) 3
C) 4
D) 3.0
Answer: B) 3