Here is my code:
info = Hash.new
def hem
print “Name?”
name = gets.chomp.downcase.capitalize
print “Surname?”
surname = gets.chomp.upcase
print “Birthday (DD.MM.YYYY)?”
birthday = gets.chomp
full_name = name + " " + surname
info[full_name] = birthday
hem
end
I can’t use it (try it on Codecademy Labs) because “hem” (random name)
can’t access the “info” hash. Would it change if I used the hash literal
notation (info = {})?
Please help me.