Exam Overview
| Exam Code | Foundations-of-Programming-Python |
| Exam Name | Foundations of Programming (Python) - E010 JIV1 |
| Vendor | WGU |
| Total Questions | 60 |
| Last Updated | 26-Oct, 2026 |
Why CertsPoint?
- Latest & Verified Questions
- Detailed Explanations
- Regular Updates
- Full-Length Practice Tests
- Boost Your Exam Confidence
PDF Study Materials
Downloadable guides and resources
Practice Tests
Full-length tests with real exam experience
Progress Tracking
Monitor your performance and improvement
Study Anywhere
Access on desktop, tablet, and mobile
Secure Payment
Privacy Protected
Money Back Guarantee
Free Foundations-of-Programming-Python Practice Questions
Explore 5 free practice questions for the WGU Foundations-of-Programming-Python exam and review the answers and explanations to support your preparation.
-
Question 1
Single answerWhich components are required in every Python for loop?
-
Option A:Correct
A variable, an iterable, and an indented code block
-
Option B:Correct
A condition, a counter, and a break statement
-
Option C:Correct
A function call, a parameter, and a return value
-
Option D:Correct
A list index, a range limit, and a step value
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: A
Explanation
A Python for loop is used to iterate over an iterable object, such as a list, tuple, string, dictionary, set, or range() object. A basic for loop needs: A loop variable An iterable object An indented code block
Example: for number in range(3): print(number) In this example: number is the loop variable. range(3) is the iterable. print(number) is the indented code block that runs during each loop iteration. According to the official Python documentation, the for statement is a construct that works with iterable objects. Therefore, the correct answer is A. A variable, an iterable, and an indented code block. -
-
Question 2
Single answerWhat determines which lines of code are executed when the condition is true in a Python if statement?
-
Option A:Correct
Lines that are enclosed in parentheses
-
Option B:Correct
Lines that share the same indentation level
-
Option C:Correct
Lines that end with semicolons
-
Option D:Correct
Lines that are enclosed in square brackets
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
In Python, indentation determines which statements belong to an if block. Example: temperature = 30
if temperature > 25: print("It is warm.") print("Drink water.") Both print() statements are executed when the condition is true because they share the same indentation level under the if statement. Python does not use parentheses, semicolons, or square brackets to define the body of an if statement. It uses indentation. Therefore, the correct answer isB. Lines that share the same indentation level. -
-
Question 3
Single answerWhich type of loop repeatedly checks a condition to determine whether to continue?
-
Option A:Correct
for loop
-
Option B:Correct
while loop
-
Option C:Correct
range loop
-
Option D:Correct
repeat loop
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
Awhile looprepeatedly executes a block of code as long as its condition remains true. Example: count = 1 while count <= 3: print(count) count += 1 In this example, Python checks the condition count <= 3 before each loop iteration. If the condition is true, the loop continues. When the condition becomes false, the loop stops. A for loop is usually used to iterate over a sequence, such as a list, string, or range. Python does not have a built-in repeat loop construct. Therefore, the correct answer isB. while loop.
-
-
Question 4
Single answerWhich data type does the expression 5 > 3 evaluate to in Python?
-
Option A:Correct
Integer
-
Option B:Correct
String
-
Option C:Correct
Boolean
-
Option D:Correct
Float
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: C
Explanation
n Python, comparison expressions such as 5 > 3 evaluate to aBooleanvalue. The expression: 5 > 3 checks whether 5 is greater than 3. Since this statement is true, Python returns: True True and False are Boolean values in Python. Therefore, the correct answer isC. Boolean.
-
-
Question 5
Single answerWhat must be consistent within a Python code block for the code to run without syntax errors?
-
Option A:Correct
Variable names
-
Option B:Correct
Indentation level
-
Option C:Correct
Comment placement
-
Option D:Correct
Line length
Show Answer & Explanation Hide Answer & Explanation
Correct Answer: B
Explanation
In Python, indentation is used to group statements into a code block. A block must have a consistent indentation level so Python can correctly understand which statements belong together. For example: if True: print("Hello") print("World") Both print() statements belong to the same if block because they use the same indentation level. If indentation is inconsistent, Python can raise an IndentationError or TabError. Therefore, the correct answer isB. Indentation level.
-