1|Page
WGU E010 Foundations Of
Programming (Python) Practice
Assessment| Certified Q&A 2026
Which tool is used to execute Python code line-by-line interactively within a
terminal?
Python shell
Text editor
File explorer
Debugger - correct-answer - Python shell
A program processes file names and extracts the last 3 characters representing
the file extension. For example, files 'document.pdf' and 'image.png' would return
'pdf' and 'png', respectively.
Which slicing approach would work for either of the provided files?
filename[:9]
,2|Page
filename[9:]
filename[-3:]
filename[:-3] - correct-answer - filename[-3:]
Which index position is returned when the string method .find('python') is applied
to the string 'learning python programming'?
8
9
1
2 - correct-answer - 9
Complete the function add_item(numeric_list, new_number) that takes a list of
numbers and a new number, and returns a new list that appends the new number
to the end of the list.
For example, add_item([1, 2, 3], 4) should return [1, 2, 3, 4].
def add_item(numeric_list, new_number):
, 3|Page
# TODO: Add new_number to the end of the list and return the list
# Example: add_item([1, 2, 3], 4) should return [1, 2, 3, 4]
pass - correct-answer - def add_item(numeric_list, new_number):
numeric_list.append(new_number)
return numeric_list
Complete the function update_grade(grades, student, new_grade) that takes a
grades dictionary, a student name, and a new grade, then updates that student's
grade and returns the dictionary.
For example, update_grade({"Alice": 85, "Bob": 90}, "Alice", 95) should return
{"Alice": 95, "Bob": 90}.
def update_grade(grades, student, new_grade):
# TODO: Update the student's grade and return the dictionary
# Example: update_grade({"Alice": 85, "Bob": 90}, "Alice", 95)
# should return {"Alice": 95, "Bob": 90}
pass - correct-answer - def update_grade(grades, student, new_grade):
WGU E010 Foundations Of
Programming (Python) Practice
Assessment| Certified Q&A 2026
Which tool is used to execute Python code line-by-line interactively within a
terminal?
Python shell
Text editor
File explorer
Debugger - correct-answer - Python shell
A program processes file names and extracts the last 3 characters representing
the file extension. For example, files 'document.pdf' and 'image.png' would return
'pdf' and 'png', respectively.
Which slicing approach would work for either of the provided files?
filename[:9]
,2|Page
filename[9:]
filename[-3:]
filename[:-3] - correct-answer - filename[-3:]
Which index position is returned when the string method .find('python') is applied
to the string 'learning python programming'?
8
9
1
2 - correct-answer - 9
Complete the function add_item(numeric_list, new_number) that takes a list of
numbers and a new number, and returns a new list that appends the new number
to the end of the list.
For example, add_item([1, 2, 3], 4) should return [1, 2, 3, 4].
def add_item(numeric_list, new_number):
, 3|Page
# TODO: Add new_number to the end of the list and return the list
# Example: add_item([1, 2, 3], 4) should return [1, 2, 3, 4]
pass - correct-answer - def add_item(numeric_list, new_number):
numeric_list.append(new_number)
return numeric_list
Complete the function update_grade(grades, student, new_grade) that takes a
grades dictionary, a student name, and a new grade, then updates that student's
grade and returns the dictionary.
For example, update_grade({"Alice": 85, "Bob": 90}, "Alice", 95) should return
{"Alice": 95, "Bob": 90}.
def update_grade(grades, student, new_grade):
# TODO: Update the student's grade and return the dictionary
# Example: update_grade({"Alice": 85, "Bob": 90}, "Alice", 95)
# should return {"Alice": 95, "Bob": 90}
pass - correct-answer - def update_grade(grades, student, new_grade):