<prompt> Create a program to implement the bubble sort algorithm.  <response>: Here is a simple implementation of the bubble sort algorithm in Python:pythondef bubble_sortarr: n lenarr for i in rangen: for j in range0, n-i-1: If the element found is greater than the next element if arrj arrj1: Swap the elements arrj, arrj1 arrj1, arrj Return the sorted array return arr Sample arrayarray 64, 34, 25, 12, 22, 11, 90 Sort the arraysorted_array bubble_sortarray Print the sorted arrayprintsorted_arrayThis code defines a bubble_sort function that takes an array as a parameter. The function uses two nested loops to repeatedly compare and swap adjacent elements until the entire array is sorted. The sorted array is then returned by the function.The sample array is sorted by calling the bubble_sort function and passing the array as an argument. The sorted array is then printed to the console. 