Last active
August 29, 2015 14:13
-
-
Save troyleach/881d756dfb78be90311b to your computer and use it in GitHub Desktop.
screencast 12
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
#screen cast 13 | |
state_capitals = { "Colorado" => "Denver", | |
"Kentucky" => "Frankfort", | |
"Illinois" => "Springfield", | |
"Minnesota" => "Saint Paul", | |
"Mississippi" => "Jackson" } | |
puts "I can tell you the capital of any of these states:" | |
state_capitals.each { |key, _| puts key } | |
print "Pick a state you would like to know where the capital is: " | |
choice = gets.chomp.capitalize | |
puts "The capital of #{choice} is #{state_capitals[choice]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well done 😄