Foundations of Programming (Python) - E010 JIV1
Last Update May 31, 2026
Total Questions : 60
We are offering FREE Foundations-of-Programming-Python WGU exam questions. All you do is to just go and sign up. Give your details, prepare Foundations-of-Programming-Python free exam questions and then go for complete pool of Foundations of Programming (Python) - E010 JIV1 test questions that will help you more.
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?
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] .
How can the first four characters be extracted from the string ' computer ' ?
Write a complete function convert_temperature(celsius) that converts Celsius to Fahrenheit using the formula: F = C * 9/5 + 32.
For example, convert_temperature(0) should return 32.0.
def convert_temperature(celsius):
# TODO: Convert Celsius to Fahrenheit using F = C * 9/5 + 32
pass
Which Python data structure contains only unique elements and does not support indexing?
Which Python data structure automatically prevents duplicate values from being stored?
Fix the missing function call in this function that should return the uppercase version of a string.
def make_uppercase(text):
return text.upper
Write a complete function calculate_discount(price, discount_percent) that calculates and returns the final price after applying a discount percentage.
For example, calculate_discount(75, 20) should return 60.0.
def calculate_discount(price, discount_percent):
# TODO: Calculate and return the final price after discount
pass
Complete the function is_positive(number) that returns True if the number is greater than 0, and False otherwise.
def is_positive(number):
# TODO: Return True if number > 0, False otherwise
pass
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
A dictionary prices = { ' apple ' : 1.50, ' banana ' : 0.75, ' orange ' : 2.00} needs to have all values increased by 0.25. Which code correctly accomplishes this task?
Which Python data structure allows duplicate values and supports methods like append() and remove()?
Write a complete function reverse_string(text) that takes a string and returns it reversed.
For example, reverse_string( " hello " ) should return " olleh " .
def reverse_string(text):
# TODO: Return the reversed string
pass