Create a histogram - 4. Creating the frequencies Hash


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-693PD/0/4?curriculum_id=5059f8619189a5000201fbcb#


undefined local variable or method `text' for # Context:0x10759e4


Hi, good day.
I have a problem when trying to set the frequencies Hash. 
According to what I could find in the forum, my code seems to be correct, still I get a "undefined local variable or method `text' for #<Context:0x10759e4>" error back.
I linked a screenshot below.
Any help on this is much appreciated.

Regards
Andreas



#2

Hi!

Line 2 has got an issue. Text is a variable you wish to get as an input. You do that by:

text = gets.chomp

I hope this helps! :wink:


#3

Awesome, thanks a lot.
It's kinda obvious actually, but the previous step passed with this code.
Anyhow, thanks


#4

You're welcome. Glad I could be of help!

Have fun coding! :wink:


#5

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