Problem with 9. Accessing Hash Values



This lesson will only let you pass if you use text as the value. I tried this horrible code below and it would not let me pass:

pets =
pets["S"] = 1
pets["s"] = 2
puts pets ["S"]
puts pets ["s"]

But this will:

pets =
pets["S"] = "a"
pets["s"] = "b"
puts pets ["S"]
puts pets ["s"]


Is this a question or a platform issue?


Issue. The platform does not identify a correct answer.

The example uses the string data type, but it says in the instructions that the key and value pairs can be any data type. I tried a different data type and it said "oops you didn't print the values" but I did print them.


Re-assigning this topic to Platform Problems and Suggestions.