simple-exercises/ruby-exercises/easy-3.rb
# Isogram Matcher
# ------------------------------------------------------------------------------
# An isogram is a word with only unique, non-repeating letters. Given two isograms
# of the same length, return an array with two numbers indicating matches:
# the first number is the number of letters matched in both words at the same position,
# and the second is the number of letters matched in both words but not in the
# same position.
Isogram Matcher
An isogram is a word with only unique, non-repeating letters. Given two isograms
of the same length, return an array with two numbers indicating matches:
the first number is the number of letters matched in both words at the same position,
and the second is the number of letters matched in both words but not in the
same position.
Isogram Matcher An isogram is a word with only unique non - repeating letters . Given two isograms of the same length return an array with two numbers indicating matches : the first number is the number of letters matched in both words at the same position and the second is the number of letters matched in both words but not in the same position .
def has_letter(c, word)
  word.each_char do |i|
    if i == c
      return true
    end
  end
  false
end
def has_letter ( c , word ) word . each_char do | i | if i == c return true end end false end
Isogram Matcher
An isogram is a word with only unique, non-repeating letters.
Isogram Matcher An isogram is a word with only unique non - repeating letters .
c
<not_specific>
word
<not_specific>