Created
February 24, 2014 11:42
-
-
Save laurenkruczyk/9186895 to your computer and use it in GitHub Desktop.
Apollo: Hashes exercise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
characters = { | |
"Tyrion Lannister" => "House Lannister", | |
"Jon Snow" => "Night's Watch", | |
"Hodor" => "House Stark", | |
"Stannis Baratheon" => "House Baratheon", | |
"Theon Greyjoy" => "House Greyjoy" | |
} | |
lannisters_house = characters ["Tyrion Lannister"] | |
snows_house = characters ["Jon Snow"] | |
hodors_house = characters["Hodor"] | |
baratheons_house = characters ["Stannis Baratheon"] | |
greyjoys_house = characters ["Theon Greyjoy"] | |
puts "Tyrion Lannister represents the #{lannisters_house}." | |
puts "Jon Snow represents the #{snows_house}." | |
puts "Hodor represents the #{hodors_house}." | |
puts "Stannis Baratheon represents the #{baratheons_house}." | |
puts "Theon Greyjoy represents the #{greyjoys_house}." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment