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 bubble_sort(arr): 
    n = len(arr) 
  
    # Traverse through all array elements 
    for i in range(n): 
  
        # Last i elements are already in place 
        for j in range(0, n-i-1): 
  
            # traverse the array from 0 to n-i-1 
            # Swap if the element found is greater 
            # than the next element 
            if arr[j] > arr[j+1] : 
                arr[j], arr[j+1] = arr[j+1], arr[j] 
  
# Driver code to test above 
arr = [6,5,3,1,8,7,2,4]
  
bubble_sort(arr)

print ("Sorted array is:")
for i in range(len(arr)):
    print ("%d" %arr[i]),
user
Sorted array is:
1
2
3
4
5
6
7
8
assistant