Help please


#1

I need help with step 5.
Here’s my code :

puts "Enter a text"
text = gets.chomp
words = text.split
frequencies = Hash.new(0)
words.each |word| do
  frequencices[word] += 1
end

Here’s the terminal output :

(ruby):4: syntax error, unexpected keyword_do_block
(ruby):6: syntax error, unexpected keyword_end, expecting end-of-input


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.