Question # 1

Multiple Choice

What will be the output of the following program?

def average(a, b):

total = a + b

return total / 2


ave = average(7,11)

print("Total", total)

print ("Average", ave)



A. an error statement since total's scope is limited to the average function.
B. Total 18
​Average 9
C. Total18
​Average9
D. an error statement since average is a keyword.

Respuesta :

Answer:

an error statement since total's scope is limited to the average function.

Explanation:

The scope of total is the function average. Code outside of the function does not have access to its value.

Correct answer edge 2020

Answer:

an error statement since total's scope is limited to the average function.

Explanation:

The scope of total is the function average. Code outside of the function does not have access to its value.

Correct answer edge 2020