<commit_before># Leap Years

# I worked on this challenge with <NAME>

# Create a method leap_year? that accepts an integer representing a year as input.

# It should return true if the year input is a leap year and false otherwise.

# Your Solution Below

def leap_year?(year)

if year % 4 == 0 && year % 100 != 0
  return true
end

if year % 4 == 0
  if year % 100 == 0
    if year % 400 == 0
      return true
    else return false
    end
  else return false
  end
else return false
end

end<commit_msg>Refactor leap year challenge<commit_after># Leap Years

# I worked on this challenge with: <NAME>

# Create a method leap_year? that accepts an integer representing a year as input.

# It should return true if the year input is a leap year and false otherwise.

# Your Solution Below

def leap_year?(year)

if year % 4 == 0 && year % 100 != 0
  return true
end

if year % 4 == 0 && year % 100 == 0
    if year % 400 == 0
      return true
      else return false
    end
  else return false
end

end
{'fraction_non_alphanumeric': 0.06858846918489066, 'fraction_numerical': 0.03180914512922465, 'mean_word_length': 2.9031007751937983, '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': '7567613', 'n_tokens_mistral': 331, 'n_tokens_neox': 300, 'n_words': 157}