Skip to content

Instantly share code, notes, and snippets.

@laurenkruczyk
Created February 24, 2014 11:42
Show Gist options
  • Save laurenkruczyk/9186895 to your computer and use it in GitHub Desktop.
Save laurenkruczyk/9186895 to your computer and use it in GitHub Desktop.
Apollo: Hashes exercise
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