Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quiz = {'is three an even number? '=>'no',
- 'what is 6 + 3? '=>'9',
- 'is this quiz too easy? '=>'yes'
- }
- quiz.each do |k,v|
- print k
- answer = gets.chomp
- puts answer
- if answer == v
- puts "that is correct!"
- else
- puts "you lose!"
- end
- end
Add Comment
Please, Sign In to add comment