Complete the code to print a friendly greeting in Ruby.
puts [1]In Ruby, puts prints the string with a newline. The string must be in quotes.
Complete the code to define a method that returns a happy message.
def happy_message [1] end
In Ruby, the last expression is returned automatically, so just the string is enough.
Fix the error in the code to create a symbol representing happiness.
mood = [1]In Ruby, symbols start with a colon and are not quoted.
Fill both blanks to create a hash with a symbol key and a string value.
feelings = { [1] => [2] }The key is a symbol :happy and the value is a string "happy".
Fill all three blanks to create a method that returns a hash with a symbol key and string value.
def [1] { [2] => [3] } end
The method name is happy_hash, the key is symbol :smile, and the value is string "Keep happy!".
