This document contains code to sort an array in ascending order and calculate the median value. It uses nested loops to compare each element to those after it, swapping any out of order. It then checks if the length is even or odd, calculates the median accordingly as the average of the middle two elements or the single middle element, and prints out the sorted array and median.