<commit_before># Factorial

# I worked on this challenge with Jamie.


# Your Solution Below
def factorial(n)
	if n < 0
		'sorry charlie!'
	elsif n <= 1
		1
		elsif (n-1).each 
			n(n-1)
		end
	end
end<commit_msg>Factorials<commit_after># Factorial

# I worked on this challenge [Jamie


# Your Solution Below
def factorial(num)
  (1..num).inject(1) {|a, b| a * b}
end


#The factorial of a number is the product 
#of all integers from 1 up to that number. 

{'fraction_non_alphanumeric': 0.10262008733624454, 'fraction_numerical': 0.017467248908296942, 'mean_word_length': 3.289719626168224, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5808841', 'n_tokens_mistral': 189, 'n_tokens_neox': 170, 'n_words': 64}