| Exam Code/Number: | Foundations-of-Programming-PythonJoin the discussion |
| Exam Name: | Foundations of Programming (Python) - E010 JIV1 |
| Certification: | WGU |
| Question Number: | 62 |
| Publish Date: | Oct 18, 2026 |
|
Rating
100%
|
|
Fix the off-by-one error in this function that should return the first 3 characters of a string.
def first_three(text):
return text[0:2]
Which Python data structure allows duplicate values and supports methods like append() and remove()?
In the code for item in my_list:, what does item represent?
Complete the function get_dict_keys(data) that takes a dictionary and returns a list of all its keys.
For example, get_dict_keys({ " name " : " John " , " age " : 25}) should return [ " name " , " age " ].
def get_dict_keys(data):
# TODO: Return a list of all dictionary keys
pass
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?
Enter your email address to download WGU.Foundations-of-Programming-Python.premium Dumps