This question shows research effort; it is useful and clear
-3
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我需要将变量添加到哈希中。我试图这样做:
actorsChickens = Hash.new
nicolasCage = gets.chomp # is a string
chickenCount = gets.chomp # is a string representing a number (i.e "5")
actorsChickens[#{nicolasCage} => #{chickenCount}]