<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
def total(array)
    
    answer = 0

    array.each do |number| #interate
        answer += number
        
    end
    return number
end


# 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>finish 4.7.2<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 by myself

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

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


# 1. total initial solution
def total(array)
    
    answer = 0

    array.each do |number| #interate
        answer += number
        
    end
    return number
end


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

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


# 5. sentence_maker initial solution

def sentence_maker(array)
    
    sentence = "" 

    array.each do |word|
        sentence += word + " "  
    end  

    return sentence.capitalize
end
        
  

# 6. sentence_maker refactored solution




{'fraction_non_alphanumeric': 0.07110609480812641, 'fraction_numerical': 0.009593679458239277, 'mean_word_length': 2.8627450980392157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '340924', 'n_tokens_mistral': 561, 'n_tokens_neox': 513, 'n_words': 222}