Greeter bug possibly?


#1

here is my code

def greeter (name)
return welcome (name)
end

not bothering outing it all in because my problem is with this part but what happens is I get a error saying
"Oops, try again. Did you define your greeter method?"
sorry if this is a stupid question just want some help


#4

What is welcome? We see no predefined entity by that name, and quite probably, neither does Ruby.

def greeter(name)
    return "Welcome #{name}"
end
print greeter("Wee Gillis")     # Welcome Wee Gillis

would make sense to a reader, at least in so far as "Welcome" is a string primitive in the expression.

Please point to the lesson number so we can check. Thanks.


#5

17.Methods With Arguments

def welcome(name)
     return "Hello, #{name}"
end
welcome("some name")

#6

hey thanks for the help I got it eventually but had unfortunately copy paste it because it for some reason wouldn't take my text it was weird.