WGU E010 OBJECTIVE ASSESSMENT 2 NEWEST 2026
ACTUAL EXAM| E010 FOUNDATIONS OF
PROGRAMMING (PYTHON) OA FINAL EXAM WITH
COMPLETE REAL EXAM QUESTIONS AND CORRECT
VERIFIED ANSWERS/ ALREADY GRADED A+
SECTION 1: VARIABLES, DATA TYPES, AND TYPE CONVERSION (Questions 1-30)
Question 1: What is the correct way to output the string "Hello, World!" in Python?
A) printf("Hello, World!")
B) console.log("Hello, World!")
C) print("Hello, World!")
D) echo "Hello, World!"
Correct Answer: C
Explanation: In Python, the built-in print() function outputs text to the console. The other
options are used in other languages (C, JavaScript, PHP) .
Question 2: Which of the following is a valid variable name in Python?
A) 2nd_place
B) my_var
C) my-var
D) class
Correct Answer: B
Explanation: Variable names must start with a letter or underscore, cannot contain hyphens,
and cannot be a reserved keyword. "class" is a reserved keyword, and "2nd_place" starts with a
digit .
Question 3: What is the data type of the value 3.14 in Python?
,A) int
B) float
C) string
D) Boolean
Correct Answer: B
Explanation: Numbers with a decimal point are of type float (floating-point). Integers have no
decimal point .
Question 4: Given x = 5 and y = 2, what is the result of x // y?
A) 2.5
B) 2
C) 2.0
D) 1
Correct Answer: B
Explanation: The floor division operator // returns the integer quotient (discards remainder). 5
// 2 = 2 .
Question 5: Which operator is used to check if two values are equal in Python?
A) =
B) ==
C) !=
D) ===
Correct Answer: B
Explanation: == is the equality comparison operator. = is assignment. != means not equal. === is
not valid in Python.
Question 6: What is the output of print (type (10))?
A) <class 'int'>
B) <class 'int'>
C) 'int'
D) <class 'integer'>
,Correct Answer: A
Explanation: The type() function returns the type object; printing it displays <class 'int'> .
Question 7: Which of the following is NOT a valid way to create a string in Python?
A) "hello"
B) 'hello'
C) hello
D) """hello"""
Correct Answer: C
Explanation: Backticks are not used for strings in Python; they are used in other languages for
command substitution. Single, double, and triple quotes are valid .
Question 8: What will the following code output? print(3 + 2 * 4)
A) 20
B) 14
C) 11
D) 24
Correct Answer: C
Explanation: Operator precedence: multiplication before addition. 2 * 4 = 8, then 3 + 8 = 11 .
Question 9: Which correctly converts the string "123" to an integer?
A) int("123")
B) integer("123")
C) str(123)
D) float("123")
Correct Answer: A
Explanation: int() converts a string (or float) to an integer. str() converts to string, float() to
floating point .
, Question 10: What is the result of bool([]) in Python?
A) True
B) False
C) None
D) Error
Correct Answer: B
Explanation: Empty containers (list, dict, set, tuple, string) evaluate to False in a boolean
context. Non-empty containers are True .
Question 11: Given my_list = [1, 2, 3, 4], what does my_list[2] return?
A) 1
B) 2
C) 3
D) 4
Correct Answer: C
Explanation: Python list indexing starts at 0. Index 2 gives the third element, which is 3 .
Question 12: What is the output of print(type())?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'str'>
Correct Answer: B
Explanation: In Python, the division operator / always returns a float, even if the numbers
divide evenly. evaluates to 5.0, and type(5.0) returns <class 'float'> .
Question 13: What is the output of bool(0)?
A) True
B) False
ACTUAL EXAM| E010 FOUNDATIONS OF
PROGRAMMING (PYTHON) OA FINAL EXAM WITH
COMPLETE REAL EXAM QUESTIONS AND CORRECT
VERIFIED ANSWERS/ ALREADY GRADED A+
SECTION 1: VARIABLES, DATA TYPES, AND TYPE CONVERSION (Questions 1-30)
Question 1: What is the correct way to output the string "Hello, World!" in Python?
A) printf("Hello, World!")
B) console.log("Hello, World!")
C) print("Hello, World!")
D) echo "Hello, World!"
Correct Answer: C
Explanation: In Python, the built-in print() function outputs text to the console. The other
options are used in other languages (C, JavaScript, PHP) .
Question 2: Which of the following is a valid variable name in Python?
A) 2nd_place
B) my_var
C) my-var
D) class
Correct Answer: B
Explanation: Variable names must start with a letter or underscore, cannot contain hyphens,
and cannot be a reserved keyword. "class" is a reserved keyword, and "2nd_place" starts with a
digit .
Question 3: What is the data type of the value 3.14 in Python?
,A) int
B) float
C) string
D) Boolean
Correct Answer: B
Explanation: Numbers with a decimal point are of type float (floating-point). Integers have no
decimal point .
Question 4: Given x = 5 and y = 2, what is the result of x // y?
A) 2.5
B) 2
C) 2.0
D) 1
Correct Answer: B
Explanation: The floor division operator // returns the integer quotient (discards remainder). 5
// 2 = 2 .
Question 5: Which operator is used to check if two values are equal in Python?
A) =
B) ==
C) !=
D) ===
Correct Answer: B
Explanation: == is the equality comparison operator. = is assignment. != means not equal. === is
not valid in Python.
Question 6: What is the output of print (type (10))?
A) <class 'int'>
B) <class 'int'>
C) 'int'
D) <class 'integer'>
,Correct Answer: A
Explanation: The type() function returns the type object; printing it displays <class 'int'> .
Question 7: Which of the following is NOT a valid way to create a string in Python?
A) "hello"
B) 'hello'
C) hello
D) """hello"""
Correct Answer: C
Explanation: Backticks are not used for strings in Python; they are used in other languages for
command substitution. Single, double, and triple quotes are valid .
Question 8: What will the following code output? print(3 + 2 * 4)
A) 20
B) 14
C) 11
D) 24
Correct Answer: C
Explanation: Operator precedence: multiplication before addition. 2 * 4 = 8, then 3 + 8 = 11 .
Question 9: Which correctly converts the string "123" to an integer?
A) int("123")
B) integer("123")
C) str(123)
D) float("123")
Correct Answer: A
Explanation: int() converts a string (or float) to an integer. str() converts to string, float() to
floating point .
, Question 10: What is the result of bool([]) in Python?
A) True
B) False
C) None
D) Error
Correct Answer: B
Explanation: Empty containers (list, dict, set, tuple, string) evaluate to False in a boolean
context. Non-empty containers are True .
Question 11: Given my_list = [1, 2, 3, 4], what does my_list[2] return?
A) 1
B) 2
C) 3
D) 4
Correct Answer: C
Explanation: Python list indexing starts at 0. Index 2 gives the third element, which is 3 .
Question 12: What is the output of print(type())?
A) <class 'int'>
B) <class 'float'>
C) <class 'double'>
D) <class 'str'>
Correct Answer: B
Explanation: In Python, the division operator / always returns a float, even if the numbers
divide evenly. evaluates to 5.0, and type(5.0) returns <class 'float'> .
Question 13: What is the output of bool(0)?
A) True
B) False