CertsPoint
See all results for ""
Exams About Us
Sign In Get Started
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

Excellent
4.6 (398 Up Votes)
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.

  1. Question 1

    Single answer

    Which components are required in every Python for loop?

    • Option A:
      A variable, an iterable, and an indented code block
      Correct
    • Option B:
      A condition, a counter, and a break statement
      Correct
    • Option C:
      A function call, a parameter, and a return value
      Correct
    • Option D:
      A list index, a range limit, and a step value 
      Correct
    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. 
  2. Question 2

    Single answer

    What determines which lines of code are executed when the condition is true in a Python if statement?

    • Option A:
      Lines that are enclosed in parentheses
      Correct
    • Option B:
      Lines that share the same indentation level
      Correct
    • Option C:
      Lines that end with semicolons
      Correct
    • Option D:
      Lines that are enclosed in square brackets 
      Correct
    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. 
  3. Question 3

    Single answer

    Which type of loop repeatedly checks a condition to determine whether to continue? 

    • Option A:
      for loop
      Correct
    • Option B:
      while loop
      Correct
    • Option C:
      range loop
      Correct
    • Option D:
      repeat loop 
      Correct
    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. 
  4. Question 4

    Single answer

    Which data type does the expression 5 > 3 evaluate to in Python?

    • Option A:
      Integer
      Correct
    • Option B:
      String
      Correct
    • Option C:
      Boolean
      Correct
    • Option D:
      Float 
      Correct
    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. 
  5. Question 5

    Single answer
    What must be consistent within a Python code block for the code to run without syntax errors?
    • Option A:
       Variable names
      Correct
    • Option B:
       Indentation level
      Correct
    • Option C:
      Comment placement
      Correct
    • Option D:
      Line length 
      Correct
    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.