Practice Makes Perfect


#1




Sooo one of the reasons why I'm confused is because I don't know what's wrong. This is error box that pops up:

Oops, try again. Did you define your greeter method?

When (unless I'm just crazy) it's definitely been defined. But there's no error code that appears in the terminal window, so I'm confused. Really appreciate your help!

def greeter(name)
    return Hello #{name}!
end


#2

do you have a by_three method?


#3

Yea I do and that one works fine. I think it might have been something with the web page. I just rewrote it and it worked. I'm not sure what was wrong. Thank you!!!


#4

Hi !
I have the same problem..
I don't understand why my code does not work, I wrote the same code as you raedambach14.


#5

Hey!

It's really kind of annoying, right! It happened to me a couple times last
night. I found that if you erase that chuck of code, save it, and then
retype it exactly as it was, it should work. If it works for you, or if you
find something else that works let me know. :slight_smile:

Good luck!
Rae


#6

I'm stuck here: What's wrong with this by_three method?

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


#7

Try changing your code to this:

def greeter(name)
    return "Hello, #{name}!"
end

I think since it's a string, it needs quotation marks...


#8

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