WGU E010 Foundations of Programming
(Python) – 2026 UPDATED OA | 200
Questions & Answers | GUARANTEED
PASS Study Guide.
1. What is the correct output of the following Python code?
python
print("Hello, World!")
• A) Hello, World!
• B) "Hello, World!"
• C) print("Hello, World!")
• D) An error occurs
,Answer: A
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
Rationale: Variable names can start with a letter or underscore, cannot
start with a digit, and cannot contain spaces or hyphens. Underscore is
allowed.
3. In Python, which symbol is used for single-line comments?
• A) //
• B) #
• C) /*
• D) <!--
,Answer: B
Rationale: The hash character # indicates a single-line comment.
Everything after it on the same line is ignored by the interpreter.
4. What is the correct way to print text in Python?
• A) echo("Hello")
• B) print("Hello")
• C) display("Hello")
• D) write("Hello")
,Answer: B
Rationale: The built-in print() function outputs text to the
console. echo, display, and write are not Python functions for console
output.
,5. Which data type is used to store text in Python?
• A) int
• B) float
• C) str
• D) bool
,Answer: C
Rationale: Strings (str) represent sequences of characters and are used to
store text.
6. What is the output of print(2 + 3)?
• A) 5
• B) "23"
• C) Error
• D) None
,Answer: A
Rationale: Python performs arithmetic addition on integers. 2 +
3 evaluates to 5.
7. What is the correct way to create a variable named age with the
value 25 in Python?
• A) age == 25
, • B) age := 25
• C) age = 25
• D) int age = 25
,Answer: C
Rationale: In Python, variable assignment uses the = operator. age =
25 assigns the integer value 25 to the variable age.
8. Which of the following is a Boolean value in Python?
• A) "True"
• B) true
• C) True
• D) 1
,Answer: C
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.
9. What is the output of bool(0)?
• A) True
• B) False
• C) 0
• D) Error
(Python) – 2026 UPDATED OA | 200
Questions & Answers | GUARANTEED
PASS Study Guide.
1. What is the correct output of the following Python code?
python
print("Hello, World!")
• A) Hello, World!
• B) "Hello, World!"
• C) print("Hello, World!")
• D) An error occurs
,Answer: A
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
Rationale: Variable names can start with a letter or underscore, cannot
start with a digit, and cannot contain spaces or hyphens. Underscore is
allowed.
3. In Python, which symbol is used for single-line comments?
• A) //
• B) #
• C) /*
• D) <!--
,Answer: B
Rationale: The hash character # indicates a single-line comment.
Everything after it on the same line is ignored by the interpreter.
4. What is the correct way to print text in Python?
• A) echo("Hello")
• B) print("Hello")
• C) display("Hello")
• D) write("Hello")
,Answer: B
Rationale: The built-in print() function outputs text to the
console. echo, display, and write are not Python functions for console
output.
,5. Which data type is used to store text in Python?
• A) int
• B) float
• C) str
• D) bool
,Answer: C
Rationale: Strings (str) represent sequences of characters and are used to
store text.
6. What is the output of print(2 + 3)?
• A) 5
• B) "23"
• C) Error
• D) None
,Answer: A
Rationale: Python performs arithmetic addition on integers. 2 +
3 evaluates to 5.
7. What is the correct way to create a variable named age with the
value 25 in Python?
• A) age == 25
, • B) age := 25
• C) age = 25
• D) int age = 25
,Answer: C
Rationale: In Python, variable assignment uses the = operator. age =
25 assigns the integer value 25 to the variable age.
8. Which of the following is a Boolean value in Python?
• A) "True"
• B) true
• C) True
• D) 1
,Answer: C
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.
9. What is the output of bool(0)?
• A) True
• B) False
• C) 0
• D) Error