The code works in the console. But I get "Oops, try again. Did you create a method called greeting?"


#1

Here's my code. I don't know why I keep getting the "Oops" message!!!
`# Define your method below!
def puts_greeting
puts ("Here we go again") {|a| puts a}
end

puts_greeting

Define your method above this line.

greeting # Ignore this for now. We'll explain

     # it in the next exercise!

#2

Hello, h2obill!

I'm not sure why either. I copied and pasted your code and all looks well! You posted three days ago so I bet I can assume that you have gotten past this error; however, if you have not, maybe you typed it incorrectly for the lesson, but correctly here haha.

Best


#3

def greeter(name)
return "greeting" + name
end

def by_three?(n)
if n%3==0
return true
else
return false
end
end

This is the correct code.
01. A greeter method that takes a single string parameter, name, and returns a string greeting that person. (Make sure to use return and don't use print or puts which you did.)


#4

You're welcome @h2obill


#5

Thanks for the info it helps, I was trying to figure it out without knowing the answer
Thanks again


#6

I was also over complicating it!!