<commit_before><commit_msg>telephone done<commit_after>// User1

// Initial Solution
// calculate summation

function sum(numbers){
  total=0;
  numbers.forEach(function (element){
    total+=element;
  })
  return total;
}
// calculate median
function median(numbers){
  numbers_array = []
  previous_element = numbers[0];
  numbers.forEach(function (value){
    if (value>previous_element)
      numbers_array.push(value);
    else
      numbers_array.unshift(value);
      previous_element=value;
  });
  while (numbers_array.length > 1) {
    size = numbers_array.length - 1;
    numbers_array.splice(0,1);
    numbers_array.splice(size,1);
  }
  return numbers_array;
}

// calculate mode

function mode(numbers){
  var track_numbers = {};
  var number_repetition = 0;
  var largest_number = 0
// creates an object with #'s as keys and how many times the # is listed as a value
  numbers.forEach(function (value){
    if(track_numbers.hasOwnProperty(value))
      track_numbers[value] += 1;
    else
      track_numbers[value] = 1;
  })
// go through the object and return the number listed most frequently
  for(var index in track_numbers) {
    if (track_numbers[index] > largest_number)
      largest_number = index;
  }
  return largest_number
}


// Pseudocode User2
// ugh i don't know if this will work
function throw_error(test) {
  var error_message = "";
  if (test === false)
    error_message = test;
  return error_message
}

// Pseudocode User3
function print_sum(numbers) {
  console.log(sum(numbers))
}

// Pseudocode User4

function print_mean(numbers) {
  console.log(mean(numbers))
}

// Pseudocode User5

function print_median(numbers) {
  console.log(median(numbers))
}
// driver code
list = [9,1,4,10,1,27,27,27]
print_median(list)
{'fraction_non_alphanumeric': 0.11547212741751992, 'fraction_numerical': 0.015927189988623434, 'mean_word_length': 3.79291553133515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6697831', 'n_tokens_mistral': 607, 'n_tokens_neox': 565, 'n_words': 140}