diff --git a/capitals.rb b/capitals.rb index e48ca16..b6bd83f 100644 --- a/capitals.rb +++ b/capitals.rb @@ -151,3 +151,17 @@ name: "Wyoming", capital: "Cheyenne" }] + +puts "Welcome!!" + +states.shuffle! +states.each do |state| + puts "Name the Capital: #{state[:name]}" + capital = gets.chomp + correct_answer = capital.capitalize == state[:capital] + while correct_answer == false + puts "Some people try, some people try again." + capital = gets.chomp + correct_answer = capital.capitalize == state[:capital] + end +end \ No newline at end of file