You know the Drill


#1

What is wrong with these codes please? Help me

puts " your text please"
text = gets.chomp
words = text.split
frequencies = Hash.new(0)
words.each do
{ |word|
frequencies[word] += 1}
end
puts frequencies[word]


#2

Hi inside your each do its should be like...... and you don't need the "{ }"

words.each do |words|
frequencies[words] +=1
puts frequencies[words]
end

#3

Thanks you very much mates. I tried and it perfectly works. Thank again