<commit_before>=begin
RESEARCH METHODS

WE WORKED ON THIS CHALLENGE TOGETHER: ACCOUNTABILITY GROUP 2

PERSON 1 = Lars
PERSON 2 = Aaron
PERSON 3 = Un
PERSON 4 = Ovi

=end

i_want_pets = ["I", "want", 3, "pets", "but", "only", "have", 2]
my_family_pets_ages = {"Evi" => 6, "Ditto" => 3, "Hoobie" => 3, "George" => 12, "Bogart" => 4, "Poly" => 4, "Annabelle" => 0}

#########################################################
### PERSON 1: <NAME>
#########################################################

### PERSON 1: ARRAY FINDING SOLUTIONS

def my_array_finding_method(source, thing_to_find)
  answer = Array.new
  source.each {|element|
    if element.to_s.downcase.include? thing_to_find
      answer << element
    end
  }
  p answer<commit_msg>Update person 1 in team solution<commit_after>=begin
RESEARCH METHODS

WE WORKED ON THIS CHALLENGE TOGETHER: ACCOUNTABILITY GROUP 2

PERSON 1 = Lars
PERSON 2 = Aaron
PERSON 3 = Un
PERSON 4 = Ovi

=end

i_want_pets = ["I", "want", 3, "pets", "but", "only", "have", 2]
my_family_pets_ages = {"Evi" => 6, "Ditto" => 3, "Hoobie" => 3, "George" => 12, "Bogart" => 4, "Poly" => 4, "Annabelle" => 0}

#########################################################
### PERSON 1: <NAME>
#########################################################
=begin


### PERSON 1: PSEUDOCODE

ARRAY FINDING SOLUTION PSEUDOCODE

   INPUT: An array of strings, plus a single letter
  OUTPUT: A new array of all the strings which contain that letter
  ----------------------------------------------------------------
  DEFINE a method that receives an array of strings, and a single letter
  CREATE a new, empty array
  ITERATE over each element of the received array
    CONVERT everything in the received array to lowercase
    DETERMINE if each converted string contains the single letter received as input
    ADD each string that contains the received letter to a new array
  OUTPUT the new array


HASH FINDING SOLUTION PSEUDOCOE

   INPUT: A hash of pet names (keys) and their ages (values), plus a positive integer
  OUTPUT: A new hash of pet names (keys) at that age (values)
  ----------------------------------------------------------------
  DEFINE a method that receives a hash containing pet names (keys) and their ages (values), and a positive integer
  CREATE a new, empty hash
  ITERATE over each key/value pair in the received hash
    COMPARE pets ages (value) with the received positive integer
    DETERMINE if the age of each pet matches the positive integer received as input
    ADD each key/value pair that matches the received value to the new hash
  OUTPUT the new hash

=end

### PERSON 1: ARRAY FINDING SOLUTIONS

def my_array_finding_method(source, thing_to_find)
  answer = Array.new
  source.each {|element|
    if element.to_s.downcase.include? thing_to_find
      answer << element
    end
  }
  p answer
{'fraction_non_alphanumeric': 0.20245183887915938, 'fraction_numerical': 0.012609457092819614, 'mean_word_length': 3.4142194744976817, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '404413', 'n_tokens_mistral': 921, 'n_tokens_neox': 835, 'n_words': 344}