Pre-Summer Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

ExamsBrite Dumps

Foundations of Programming (Python) - E010 JIV1 Question and Answers

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.

Foundations-of-Programming-Python pdf

Foundations-of-Programming-Python PDF

$36.75  $104.99
Foundations-of-Programming-Python Engine

Foundations-of-Programming-Python Testing Engine

$43.75  $124.99
Foundations-of-Programming-Python PDF + Engine

Foundations-of-Programming-Python PDF + Testing Engine

$57.75  $164.99
Questions 1

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?

Options:

A.  

filename[:9]

B.  

filename[9:]

C.  

filename[-3:]

D.  

filename[:-3]

Discussion 0
Questions 2

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] .

Options:

A.  

def add_item(numeric_list, new_number):numeric_list.append(new_number)return numeric_list

B.  

def add_item(numeric_list, new_number):numeric_list.remove(new_number)return numeric_list

C.  

def add_item(numeric_list, new_number):return new_number

D.  

def add_item(numeric_list, new_number):pass

Discussion 0
Questions 3

How can the first four characters be extracted from the string ' computer ' ?

Options:

A.  

' computer ' [0:4]

B.  

' computer ' [1:4]

C.  

' computer ' [1:5]

D.  

' computer ' [0:3]

Discussion 0
Questions 4

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

Options:

Discussion 0
Questions 5

Which Python data structure cannot be modified after creation?

Options:

A.  

List

B.  

Dictionary

C.  

Tuple

D.  

Set

Discussion 0
Questions 6

Which keyword is used to exit a loop prematurely in Python?

Options:

A.  

return

B.  

break

C.  

stop

D.  

end

Discussion 0
Questions 7

Which Python data structure contains only unique elements and does not support indexing?

Options:

A.  

List

B.  

Tuple

C.  

Dictionary

D.  

Set

Discussion 0
Questions 8

What must a developer do to run Python code written in a text editor?

Options:

A.  

Save the file and use a Python interpreter.

B.  

Press a run button within the editor.

C.  

Upload the code to a web server.

D.  

Convert the code to machine language first.

Discussion 0
Questions 9

Which Python data structure automatically prevents duplicate values from being stored?

Options:

A.  

List

B.  

Tuple

C.  

Dictionary

D.  

Set

Discussion 0
Questions 10

Which components are required in every Python for loop?

Options:

A.  

A variable, an iterable, and an indented code block

B.  

A condition, a counter, and a break statement

C.  

A function call, a parameter, and a return value

D.  

A list index, a range limit, and a step value

Discussion 0
Questions 11

Fix the missing function call in this function that should return the uppercase version of a string.

def make_uppercase(text):

return text.upper

Options:

Discussion 0
Questions 12

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

Options:

Discussion 0
Questions 13

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

Options:

Discussion 0
Questions 14

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

Options:

Discussion 0
Questions 15

In Python, what must follow the in keyword in a for loop?

Options:

A.  

A condition

B.  

An iterable object

C.  

A number

D.  

A variable name

Discussion 0
Questions 16

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?

Options:

A.  

for item in prices:prices[item] = prices[item] + 0.25

B.  

for value in prices:value = value + 0.25

C.  

for prices in item:prices = prices + 0.25

Discussion 0
Questions 17

Which Python data structure allows duplicate values and supports methods like append() and remove()?

Options:

A.  

Set

B.  

Dictionary

C.  

List

D.  

Tuple

Discussion 0
Questions 18

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

Options:

Discussion 0