WGU E010 Objective Assessment Final Exam
Questions And Answers Practice Questions
with Solutions Newest | Already Graded A+
SECTION 1: Python Basics & Data Types
(Questions 1-15)
Q1. What is the output of print(type(5))?
• A) <class 'int'>
• B) <class 'float'>
• C) <class 'str'>
• D) <class 'bool'>
Answer: A – 5 is an integer literal, so type() returns <class 'int'>.
Q2. Which of the following is NOT a valid Python data type?
• A) int
• B) float
• C) double
• D) str
Answer: C – Python does not have a double data type; it uses float for
floating-point numbers.
Q3. What is the output of print()?
• A) 3
• B) 3.3333333333333335
, • C) 3.0
• D) 4
Answer: B – The / operator always returns a float. 10 /
3 produces 3.3333333333333335 due to floating-point representation.
Q4. What is the result of 10 // 3?
• A) 3.3333333333333335
• B) 3
• C) 3.0
• D) 4
Answer: B – The // operator performs floor division, returning the integer
quotient rounded down to the nearest whole number.
Q5. Which of the following is a valid variable name in Python?
• A) 2ndPlace
• B) second-place
• C) _secondPlace
• D) second place
Answer: C – Variable names must start with a letter or underscore, cannot
contain spaces or hyphens, and cannot start with a digit.
Q6. What is the output of print("Python"[0])?
• A) P
• B) y
• C) t
• D) h
,Answer: A – Strings are zero-indexed. Index 0 returns the first character,
which is 'P'.
Q7. What does len("Hello World") return?
• A) 10
• B) 11
• C) 12
• D) 9
Answer: B – len() counts all characters including spaces. "Hello World" has
11 characters.
Q8. What is the output of print(2 ** 3)?
• A) 6
• B) 8
• C) 9
• D) 5
Answer: B – ** is the exponentiation operator. 2 ** 3 = 2 × 2 × 2 = 8.
Q9. What is the result of 17 % 5?
• A) 2
• B) 3
• C) 3.4
• D) 5
Answer: A – The modulo operator % returns the remainder. 17 ÷ 5 =
3 remainder 2.
, Q10. What is the output of print(5 > 3 and 10 < 5)?
• A) True
• B) False
• C) None
• D) Error
Answer: B – 5 > 3 is True, 10 < 5 is False. True and False evaluates to False.
Q11. Which symbol is used for single-line comments in Python?
• A) //
• B) #
• C) /*
• D) %
Answer: B – The # symbol denotes a single-line comment. Everything
after # on that line is ignored by the interpreter.
Q12. What is the output of bool([])?
• A) True
• B) False
• C) None
• D) Error
Answer: B – Empty sequences (lists, tuples, strings, dictionaries, sets)
evaluate to False in a Boolean context.
Q13. What is the output of print(5 == "5")?
• A) True
• B) False
Questions And Answers Practice Questions
with Solutions Newest | Already Graded A+
SECTION 1: Python Basics & Data Types
(Questions 1-15)
Q1. What is the output of print(type(5))?
• A) <class 'int'>
• B) <class 'float'>
• C) <class 'str'>
• D) <class 'bool'>
Answer: A – 5 is an integer literal, so type() returns <class 'int'>.
Q2. Which of the following is NOT a valid Python data type?
• A) int
• B) float
• C) double
• D) str
Answer: C – Python does not have a double data type; it uses float for
floating-point numbers.
Q3. What is the output of print()?
• A) 3
• B) 3.3333333333333335
, • C) 3.0
• D) 4
Answer: B – The / operator always returns a float. 10 /
3 produces 3.3333333333333335 due to floating-point representation.
Q4. What is the result of 10 // 3?
• A) 3.3333333333333335
• B) 3
• C) 3.0
• D) 4
Answer: B – The // operator performs floor division, returning the integer
quotient rounded down to the nearest whole number.
Q5. Which of the following is a valid variable name in Python?
• A) 2ndPlace
• B) second-place
• C) _secondPlace
• D) second place
Answer: C – Variable names must start with a letter or underscore, cannot
contain spaces or hyphens, and cannot start with a digit.
Q6. What is the output of print("Python"[0])?
• A) P
• B) y
• C) t
• D) h
,Answer: A – Strings are zero-indexed. Index 0 returns the first character,
which is 'P'.
Q7. What does len("Hello World") return?
• A) 10
• B) 11
• C) 12
• D) 9
Answer: B – len() counts all characters including spaces. "Hello World" has
11 characters.
Q8. What is the output of print(2 ** 3)?
• A) 6
• B) 8
• C) 9
• D) 5
Answer: B – ** is the exponentiation operator. 2 ** 3 = 2 × 2 × 2 = 8.
Q9. What is the result of 17 % 5?
• A) 2
• B) 3
• C) 3.4
• D) 5
Answer: A – The modulo operator % returns the remainder. 17 ÷ 5 =
3 remainder 2.
, Q10. What is the output of print(5 > 3 and 10 < 5)?
• A) True
• B) False
• C) None
• D) Error
Answer: B – 5 > 3 is True, 10 < 5 is False. True and False evaluates to False.
Q11. Which symbol is used for single-line comments in Python?
• A) //
• B) #
• C) /*
• D) %
Answer: B – The # symbol denotes a single-line comment. Everything
after # on that line is ignored by the interpreter.
Q12. What is the output of bool([])?
• A) True
• B) False
• C) None
• D) Error
Answer: B – Empty sequences (lists, tuples, strings, dictionaries, sets)
evaluate to False in a Boolean context.
Q13. What is the output of print(5 == "5")?
• A) True
• B) False