I'm new to this and confused.
import numpy as np
randomnums = np.random.randint(1,100, size=(100,100))
print("Unsorted 100x100 Array:")
print(randomnums)
def bubbleSort(randomnums):
indexLength = len(randomnums)
for i in range(indexLength-1): #for all the values in the array
for x in range(1,indexLength,2): #for all the odd indexs
if randomnums[x] > randomnums[x+1]: #if number on left is larger
randomnums[x],randomnums[x+1] = randomnums[x+1], randomnums[x] #swap the values to sort in ascending order
else:
for x in range(0,indexLength,2): #for all the even indexs
if randomnums[x] < randomnums[x+1]:
randomnums[x], randomnums[x+1] = randomnums[x+1], randomnums[x] #swap the values to sort in descending order