You will build a method called
say_hello. This method should accept the argument of a person's name. It then should print
"Hello " with the name followed by an exclamation point (don't forget that space after the "Hello"). For instance:
# I call on the method, say_hello, and give it the string "Gabriela" say_hello("Gabriela") # The method prints this text to the screen: Hello Gabriela!
There is one more thing this method should do: if you call on this method and forget to give it the name of a person, it should just say,
"Hello Ruby Programmer!". Use a default argument to accomplish this!
learnto see where you stand.
say_hellobut couldn't find it.
learnagain. Are you getting a different error? If you haven't seen this error, guess what it's trying to tell you then Google it with the word "ruby".
learn submitto submit your lab.
View Say Hello on Learn.co and start learning to code for free.