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 find_second_highest_num(nums):
    first_max = nums[0]
    second_max = float('-inf')
    for num in nums:
        if num > first_max:
            second_max = first_max
            first_max = num 
        if num < first_max and num > second_max:
            second_max = num
    return second_max

nums = [8,9,1,5,7]

print(find_second_highest_num(nums))
user
8
assistant