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
# Python 3 program to count the number of occurrences 
# of an element in the given list

# function to count the number of occurrences 
def countOccurrences(nums, query):
    count = 0
    for num in nums:
        if query == num:
            count = count + 1
    return count

# Driver code 
nums = [1, 2, 3, 2, 3, 2, 4]

# Function Call
query = 2
print("{0} occurs {1} times".format(query, countOccurrences(nums, query)))
user
2 occurs 3 times
assistant