<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 [by myself, with: ].

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

# Input:
# Output:
# Steps to solve the problem.


# 1. total initial solution



# 3. total refactored solution



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


# 5. sentence_maker initial solution



# 6. sentence_maker refactored solution<commit_msg>Complete 4.7.2 add it up exercises<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 [with: <NAME>].

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

# Input:
# Output:
# Steps to solve the problem.


# 1. total initial solution
=begin
def total(array)
	total = 0
	array.each do |i|
		total += i
	end
	return total
end
=end

# 3. total refactored solution
def total(array)
	return array.inject(:+)
end


# 4. sentence_maker pseudocode
# make sure all pseudocode is commented out!
# Input:
# Output:
# Steps to solve the problem.
=begin
def sentence_maker(array)
	sentence = ""
	array[0] = array[0].capitalize
	array.each do |i|
		sentence = sentence + i.to_s + " "
	end
	return sentence.strip + "."
end
=end

# 5. sentence_maker initial solution



# 6. sentence_maker refactored solution
def sentence_maker(array)
	array[0] = array[0].capitalize
	return array.join(" ") + "."
end
{'fraction_non_alphanumeric': 0.08943089430894309, 'fraction_numerical': 0.011614401858304297, 'mean_word_length': 3.8128491620111733, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3080792', 'n_tokens_mistral': 577, 'n_tokens_neox': 531, 'n_words': 225}