Summer Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

WGU Foundations-of-Programming-Python - Foundations of Programming (Python) - E010 JIV1

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 data type is the value 3.14 in Python?

A.

Integer

B.

Float

C.

String

D.

Boolean

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

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

Which index position is returned when the string method .find( ' python ' ) is applied to the string ' learning python programming ' ?

A.

8

B.

9

C.

1

D.

2

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?

A.

if number > 0:

B.

if number != 0:

C.

if number < 0:

D.

if number > = 1:

What does the string method ' ' .join() return when applied to the list [ ' Hello ' , ' World ' ]?

A.

' Hello,World '

B.

' HelloWorld '

C.

' Hello World '

D.

' Hello, World '

Write a complete function word_count(text) that counts and returns the number of words in the given text. Words are separated by spaces.

For example, word_count( " Hello world Python " ) should return 3.

def word_count(text):

# TODO: Count and return the number of words in text

pass

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

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.