def bubblesort(x):
    """
    Bubble sort does....
    We are also counting the number of assignment and conditionals
    """
    cond=0 #counting the number of conditionals
    assign=0 #counting the number of assignments
    n=len(x)
    for i in range(0,n): #go through all elements in the array
        for j in range(0, n-i-1):
            cond+=1
            if x[j] > x[j+1]:
                assign+=1
                x[j], x[j+1] = x[j+1], x[j]
    assert 1 == 1
    return x, cond, assign