WGU E010 FOUNDATIONS OF
PROGRAMMING (PYTHON) –
ADVANCED ASSESSMENT
1. What is the result of the expression 5 // -2 in Python 3?
A. -2.5
B. -3
C. -2
D. 2
Answer: B
Conceptual Explanation: Floor division (//) rounds toward negative infinity. 5 / -2 is -2.5,
and the floor of -2.5 is -3.
2. Which of the following is true regarding Python’s ‘is’ operator?
A. It compares the values of two objects.
B. It is synonymous with the == operator.
C. It checks if two variables point to the same memory location.
D. It returns True if two strings are identical in content.
,Answer: C
Conceptual Explanation: The ‘is’ operator checks for identity (object ID), whereas ‘==’
checks for equality (value).
3. What will be the output of: print(type())?
A. <class ‘int’>
B. <class ‘number’>
C. <class ‘decimal’>
D. <class ‘float’>
Answer: D
Conceptual Explanation: In Python 3, the division operator (/) always returns a float,
even if the result is a whole number.
4. Which method is used to remove an item from a list by its index and return it?
A. pop()
B. delete()
C. discard()
D. remove()
Answer: A
, Conceptual Explanation: The pop(index) method removes and returns the element at the
specified index. remove() deletes by value.
5. What is the output of bool(‘False’)?
A. False
B. Error
C. None
D. True
Answer: D
Conceptual Explanation: Any non-empty string evaluates to True in a boolean context,
including the string ‘False’.
6. Which of the following data types is immutable?
A. List
B. Dictionary
C. Set
D. Tuple
Answer: D
Conceptual Explanation: Tuples are immutable sequences, meaning their contents cannot
be changed after creation.
PROGRAMMING (PYTHON) –
ADVANCED ASSESSMENT
1. What is the result of the expression 5 // -2 in Python 3?
A. -2.5
B. -3
C. -2
D. 2
Answer: B
Conceptual Explanation: Floor division (//) rounds toward negative infinity. 5 / -2 is -2.5,
and the floor of -2.5 is -3.
2. Which of the following is true regarding Python’s ‘is’ operator?
A. It compares the values of two objects.
B. It is synonymous with the == operator.
C. It checks if two variables point to the same memory location.
D. It returns True if two strings are identical in content.
,Answer: C
Conceptual Explanation: The ‘is’ operator checks for identity (object ID), whereas ‘==’
checks for equality (value).
3. What will be the output of: print(type())?
A. <class ‘int’>
B. <class ‘number’>
C. <class ‘decimal’>
D. <class ‘float’>
Answer: D
Conceptual Explanation: In Python 3, the division operator (/) always returns a float,
even if the result is a whole number.
4. Which method is used to remove an item from a list by its index and return it?
A. pop()
B. delete()
C. discard()
D. remove()
Answer: A
, Conceptual Explanation: The pop(index) method removes and returns the element at the
specified index. remove() deletes by value.
5. What is the output of bool(‘False’)?
A. False
B. Error
C. None
D. True
Answer: D
Conceptual Explanation: Any non-empty string evaluates to True in a boolean context,
including the string ‘False’.
6. Which of the following data types is immutable?
A. List
B. Dictionary
C. Set
D. Tuple
Answer: D
Conceptual Explanation: Tuples are immutable sequences, meaning their contents cannot
be changed after creation.