- Home
- WGU
- Foundations-of-Programming-Python Exam Questions
WGU Foundations-of-Programming-Python Practice Exam Questions & Answers
5 Free Questions
· Last reviewed: September 14, 2026
· Prepared & Reviewed by the ValidExamDumps Editorial Team
Exam Facts
WGU Foundations-of-Programming-Python Exam Details
Key details for this exam, checked against the published exam outline
60
Practice Questions (Our Bank)
- Exam Code
- Foundations-of-Programming-Python
- Full Name
- Foundations of Programming (Python) - E010 JIV1
- Issuing Body
- WGU Courses and Certifications
- Question Format (Our Bank)
- Multiple Choice
Practice Questions
Free Foundations-of-Programming-Python Practice Questions
Each question shows the correct answer and an explanation of why it is right
VA
ValidExamDumps Editorial Team
Every question and its answer is checked by our Foundations-of-Programming-Python exam
preparation team, who also write the explanation shown with each one.
How we research and review these pages
SIMULATION
Modify the function greet_with_default(name) by adding a default value of "World" to the name parameter so it can be called with or without an argument.
def greet_with_default(name):
# TODO: Add a default value of "World" to the name parameter
return "Hello " + name
Correct Answer:
A
Explanation
Step 1: A default parameter value allows a function to be called even when no argument is provided.
Step 2: The default value should be added in the function header.
Step 3: The parameter name should have the default value 'World'.
Correct code:
def greet_with_default(name='World'):
return 'Hello ' + name
Example:
print(greet_with_default())
print(greet_with_default('Alice'))
Output:
Hello World
Hello Alice
Which terminal command is used to navigate to a different directory before running a Python script?
Correct Answer:
C
Explanation
The command cd means ''change directory.'' It is used in a terminal to move from one folder to another.
Example:
cd Desktop
After navigating to the correct folder, a Python script can be run with a command such as:
python script.py
Therefore, the correct answer isC. cd.
A program needs to display only positive, non-zero numbers from a list containing a mixture of integer and decimal values. Which conditional statement should be placed inside the loop?
Correct Answer:
A
Explanation
To display only positive, non-zero numbers, the condition should check whether each number is greater than 0.
Correct condition:
if number > 0:
Example:
numbers = [-2, 0, 1, 3.5, -4.2]
for number in numbers:
if number > 0:
print(number)
Output:
1
3.5
The condition number > 0 works for both integers and decimal values. The condition number >= 1 would incorrectly exclude positive decimal values such as 0.5.
Therefore, the correct answer isA. if number > 0:.
Which Python data structure contains only unique elements and does not support indexing?
Correct Answer:
D
Explanation
A set is a Python data structure that stores only unique elements. This means duplicate values are automatically removed.
Example:
numbers = {1, 2, 2, 3}
print(numbers)
Output:
{1, 2, 3}
The duplicate value 2 appears only once in the set.
Sets are also unordered, so they do not support indexing like lists or tuples do. For example, numbers[0] would cause an error because sets are not accessed by position.
The official Python documentation describes sets as unordered collections with no duplicate elements.
Therefore, the correct answer is D. Set.
Which components are required in every Python for loop?
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.
Study Guide
What the WGU Foundations-of-Programming-Python Exam Covers
5 domains from the WGU Foundations-of-Programming-Python exam outline, with approximate weightings. Every sample question above is tagged
with the domain it comes from
Domain 1: Variables, Data Types, and Basic Operations
Declare and initialize variables, assign values, and perform arithmetic and string operations. Recognize data type behavior including integers, floats, strings, and booleans, and apply type conversion where needed.
Domain 2: Control Flow and Decision Making
Use if, elif, and else statements to direct program flow based on conditions. Apply logical operators (and, or, not) and write conditional expressions to handle different scenarios.
Sample questions from this domain above:
Q1Q4
Domain 3: Loops and Iteration
Use for and while loops to repeat code blocks and iterate through sequences like lists and strings. Control loop behavior with break and continue statements.
Domain 4: Functions and Modular Programming
Define and call functions with parameters and return values. Understand variable scope and how to write reusable code modules that follow the DRY principle.
Sample question from this domain above:
Q2
Domain 5: Data Structures and Input/Output
Work with lists, tuples, and dictionaries to organize and store data. Perform user input and output operations, handle basic file operations, and process data.
Sample questions from this domain above:
Q3Q5
FAQ
Foundations-of-Programming-Python Exam FAQ
Common questions about the exam itself
What programming experience do I need before taking Foundations of Programming (Python) E010 JIV1?
This exam is designed as a foundational certification and assumes no prior programming experience. You should have basic computer literacy and be comfortable using a text editor and command line, but formal coding knowledge is not required.
How long should I study for the Foundations of Programming Python E010 JIV1 exam?
Most candidates spend 4 to 8 weeks preparing, depending on their background and available study time. If you have no programming experience, plan toward the longer end. The five content areas build on each other, so spacing practice over several weeks helps reinforce concepts.
What topics do most candidates find hardest on the E010 JIV1 exam?
Control flow and nested loops tend to challenge candidates most. Practice writing and tracing code that uses if statements inside loops, and work through scenarios where you need to combine conditions with iteration to understand the interaction between these concepts.
Is the Foundations of Programming Python E010 JIV1 exam proctored, and can I take it online?
WGU certification exams are typically proctored, though you should confirm the exact delivery method and testing location options on the official WGU exam page when you register.
What score do I need to pass Foundations of Programming (Python) E010 JIV1?
WGU publishes passing scores for each exam, but the specific threshold for E010 JIV1 is not confirmed in available sources. Check the official exam registration page for the exact passing score.
Can I retake the Foundations of Programming Python E010 JIV1 exam if I don't pass?
Yes, WGU allows exam retakes. Specific policies on retake scheduling and any waiting periods between attempts should be confirmed in your WGU student handbook or through your program advisor.
How long is the Foundations of Programming (Python) E010 JIV1 certification valid after I pass?
The validity period for WGU certifications varies by program. Check your program documentation or contact WGU to confirm whether E010 JIV1 expires after a set number of years or remains valid indefinitely.
What job roles does the Foundations of Programming Python E010 JIV1 certification support?
This exam validates foundational Python skills that prepare you for entry-level programming roles such as junior developer, software developer, or junior data analyst. It also serves as a stepping stone to more advanced WGU programming certifications.
How does E010 JIV1 relate to other programming certifications in the WGU track?
Foundations of Programming (Python) E010 JIV1 is a beginner-level certification within the WGU Courses and Certifications pathway. It establishes core Python knowledge before advancing to intermediate or specialized programming certifications.
What format are the questions on the Foundations of Programming Python E010 JIV1 exam?
The exam uses multiple-choice, scenario-based, and code-reading questions that test your ability to write, debug, and reason about Python code. Expect questions where you read code and predict output, write code snippets, or identify errors in existing code.