code: def insert_ordered(value, array):
      
  
      index = 0
  
      # search for the last array item that value is larger than
      for n in range(0,len(array)):
          if value >= array[n]: index = n+1
  
      array.insert(index, value)
      return index
docs: This will insert the value into the array, keeping it sorted, and returning the
      index where it was inserted