<commit_before># Numbers to Commas Solo Challenge

# I spent [] hours on this challenge.

# 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.

# 0. Pseudocode

# What is the input? positive integer
# What is the output? (i.e. What should the code return?) commas-separated integer as a string
# What are the steps needed to solve the problem?
# define condition to change integer to string
  # integer_to.s
# define condition to include commas
  # IF integer.length > 3
  # activate condition to include commas every 3 digital from the left

# 1. Initial Solution
def separate_comma (number)
  if number < 4
    p number.to_s




# 2. Refactored Solution




# 3. Reflection<commit_msg>commas and nums challenge completed - missing reflection<commit_after># Numbers to Commas Solo Challenge

# I spent [] hours on this challenge.

# 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.

# 0. Pseudocode

# What is the input? positive integer
# What is the output? (i.e. What should the code return?) commas-separated integer as a string
# What are the steps needed to solve the problem?
# define condition to change integer to string
  # integer_to.s
# define condition to include commas
  # IF integer.length > 3
  # activate condition to include commas every 3 digital from the left

# 1. Initial Solution

def separate_comma(number)
  if number.to_s.length < 4
    return number.to_s
  else
    new_number = []
    i = 1
    number.to_s.reverse.split('').each do |x|
      new_number.push(x)
      if i % 3 == 0
        new_number.push(",")
      end
      i = i + 1
    end
    return new_number.reverse.join
  end
end




# 2. Refactored Solution




# 3. Reflection
{'fraction_non_alphanumeric': 0.06592827004219409, 'fraction_numerical': 0.00949367088607595, 'mean_word_length': 3.2725225225225225, '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': '6418496', 'n_tokens_mistral': 575, 'n_tokens_neox': 533, 'n_words': 254}