Codecademy bug, or have I goofed up? 15. Now You Try!


#1



I spent awhile stuck on this and still don't know whats wrong. Forgive my impatience, but I would like to get help before the end of the day(if possible.) In the past I have found the Ruby community... Small... So if you do know how to help, please help. :slight_smile:


https://www.codecademy.com/courses/ruby-beginner-en-L3ZCI/2/4?curriculum_id=5059f8619189a5000201fbcb#


(ruby):3: formal argument cannot be a constant
symbol_filter = lambda { |A| A.is_a? Symbol}
^


Replace this line with your code. 
my_array = ["raindrops", :kettles, "whiskers", :mittens, :packages]

# Add your code below!
symbol_filter = lambda { |A| A.is_a? Symbol}
Symbol = my_array.select(&symbol_filter)


#2

That is the class name. You won't want to overwrite it, now will you?

symbols =

Although it is moot, we should stick to lowercase for ordinary variables.


#3

Hmmm, changed it to lowercase and tried changing Symbol to symbol, now I get this.

Oops, try again. Did you create an array called symbols?

Also, what the heck does "moot" mean?


#4
symbols =

moot adj no argument. A moot point is one that everyone agrees with, and only a fool would argue against.


#5

Ooohhh, well hope you don't take me for a fool, didn't know that you should use lower case. Hmmm

my_array = ["raindrops", :kettles, "whiskers", :mittens, :packages]

symbol = lambda { |a| a.is_a? symbols}
symbol = my_array.select(&symbols)

class or module required

and

Oops, try again. Your code doesn't look quite right. Check the Hint if you need help!


#6

Not at all. Was hoping you wouldn't think that directed at you. It's a 'generally speaking' sort of thing to say.

symbol_filter = lambda { |a| a.is_a? Symbol}   # is a member of Symbol class
symbols = my_array.select(&symbol_filter)   # passing proc to select method

#7

:smile:

symbols = lambda { |a| a.is_a? symbol}
symbols = my_array.select(&symbol)

Is this what you meant?
EDIT:
nvm


#8

See my example just above.

A proc is like a JavaScript callback.


#9

Ooohh, so I was closer the first time eh... Thanks for the help, I think I understand it better now.

EDIT:

I took javascript until I was halfway through(computer crashed) and I couldn't pick back up, rusty though.


#10

You're pretty close to completing this track. Keep pouring it on and finish today. We should expect this track to be locked within the next day or two. Python is already locked. Both courses are being replaced. You'll only get 100% credit if you complete the track, else it will register 0%.

I'll be online this evening. If you need to get my attention, post in the forum and then invite me.


#11

Kinda annoys me that I might not finish before they update...

Okay!


#12

Do your best. I don't mind standing by to help. This is not a hard track to complete. Keep notes of anything that needs more reading and keep motoring forward.


#13

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