You are going to act as a Python interpreter. You will be given a valid python program below. Write down what you think the result of its execution would be. Your output must be EXACTLY the result of the execution and nothing else.
situation
system
def diffMaxMin(arr):
    maxVal = arr[0]
    minVal = arr[0]
    
    for num in arr:
        if num > maxVal:
            maxVal = num
        elif num < minVal:
            minVal = num
            
    return maxVal - minVal

arr = [1, 8, 4, 5, 9]
result = diffMaxMin(arr)
print(result)
user
8
assistant