<commit_before># Add it up!

# Complete each step below according to the challenge directions and
# include it in this file. Also make sure everything that isn't code
# is commented in the file.

# I worked on this challenge <NAME>.

# 0. total Pseudocode
# make sure all pseudocode is commented out!

# Input: Array of numbers
# Output: Sum of numbers
# Steps to solve the problem.


# 1. total initial solution

#def total (array)
#  total = 0
#  array.each do |x|
#   total += x
#  end
#  total
#end


# 3. total refactored solution
def total (array)
  total = 0
  array.each { |x| total += x }
  total
end



# 4. sentence_maker pseudocode
# make sure all pseudocode is commented out!
# Input: Array of strings
# Output: String
# Steps to solve the problem.


# 5. sentence_maker initial solution
def sentence_maker (array)
  sentence = array[0].capitalize()
  (1..(array.length-1)).each do |x|
    sentence = sentence + " " + array[x].to_s
  end
  sentence = sentence +"."
end

# 6. sentence_maker refactored solution

def sentence_maker (array)
  array.join(" ").capitalize() + "."
end<commit_msg>add all 4.7<commit_after># Add it up!

# Complete each step below according to the challenge directions and
# include it in this file. Also make sure everything that isn't code
# is commented in the file.

# I worked on this challenge <NAME>.

# 0. total Pseudocode
# make sure all pseudocode is commented out!

# Input: Array of numbers
# Output: Sum of numbers
# Steps to solve the problem.


# 1. total initial solution

def total (array)
  total = 0
  array.each do |x|
   total += x
  end
  total
end


# 3. total refactored solution
def total (array)
  total = 0
  array.each { |x| total += x }
  total
end



# 4. sentence_maker pseudocode
 make sure all pseudocode is commented out!
 Input: Array of strings
 Output: String
 Steps to solve the problem.


# 5. sentence_maker initial solution
def sentence_maker (array)
  sentence = array[0].capitalize()
  (1..(array.length-1)).each do |x|
    sentence = sentence + " " + array[x].to_s
  end
  sentence = sentence +"."
end

# 6. sentence_maker refactored solution

def sentence_maker (array)
  array.join(" ").capitalize() + "."
end
{'fraction_non_alphanumeric': 0.09940720474236206, 'fraction_numerical': 0.01094391244870041, 'mean_word_length': 3.4233870967741935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3605789', 'n_tokens_mistral': 731, 'n_tokens_neox': 685, 'n_words': 285}