<commit_before>### Week 02 ###

# load "week02.rb"

def print_stars(number_of_stars) 
  puts "*" * number_of_stars
end

def print_diamond(size)
  # ???
end

def is_even?(number)
  if (number % 2 == 0)
    return true
  else
    return false
  end
end

def is_odd?(number)
  # ???
end

def is_fizz(number)
  # Is it divisible by three?
end

def is_buzz(number)
  # Is it divisible by five?
end

def print_fizzbuzz(size)
  # Should print the following when you type print_fizzbuzz(7) in irb:
  #
  #> 1
  #> 2
  #> fizz
  #> 4
  #> buzz
  #> fizz
  #> 7
end<commit_msg>Updated week 2.<commit_after># load("week02.rb")

# In Ruby and other programming languages, you can take a little bit
# of code, and separate it out into your own function.
def print_stars(number_of_stars) 
  puts "*" * number_of_stars
end

# It works like this:
#
# > print_stars(3)
# ***
#  => nil

# Challenge: use print_stars() to make a print_diamond() function.
# See last week's work for how it should behave.
def print_diamond(size)
  # ???
end

# Here is another function that returns either true or false. In Ruby
# we normally end functions that return either true or false with a
# question mark.
def is_even?(number)
  if (number % 2 == 0)
    return true
  else
    return false
  end
end

# Challenge: take is_even?() and make an is_odd?() function.
def is_odd?(number)
  # ???
end

# Challenge: return true when the number is divisible by three.
def is_fizz(number)
  # Is it divisible by three?
end

# Challenge: return true when the number is divisible by five.
def is_buzz(number)
  # Is it divisible by five?
end

# Challenge: use your is_fizz?() and is_buzz?() functions to play
# FizzBuzz. See http://en.wikipedia.org/wiki/Fizz_buzz
def print_fizzbuzz(size)
  # Should print the following when you type print_fizzbuzz(7) in irb:
  #
  #> 1
  #> 2
  #> fizz
  #> 4
  #> buzz
  #> fizz
  #> 7
end
{'fraction_non_alphanumeric': 0.10668789808917198, 'fraction_numerical': 0.01167728237791932, 'mean_word_length': 3.488095238095238, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1001520', 'n_tokens_mistral': 719, 'n_tokens_neox': 691, 'n_words': 239}