Median <- function(x){
  n <- length(x)
  ascend <- sort(x)
  if(n %% 2 == 0){
    mid <- ascend[c(floor(n/2),floor(n/2)+1)]
    med <- sum(mid)/2
  } else {
    med <- ascend[ceiling(n/2)]
  }
  cat("the median for the data set",x,"is,",med)
}
data_set_1 <- c(10, 11, 15, 16, 19, 20, 89)
data_set_2 <- c(16, 27, 5, 52, 109, 113, 98, 99)
Median(data_set_1)
## the median for the data set 10 11 15 16 19 20 89 is, 16
Median(data_set_2)
## the median for the data set 16 27 5 52 109 113 98 99 is, 75