Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env ruby

answer = loop do
  print "Does the song contain guitars? [y/n] "
  answer = gets.chomp
  break answer if %w( y n ).include?(answer)
  puts "Please answer 'y' or 'n'."
end

if answer == 'y'
  puts "This song is not trance! Hooray!"
else
  puts "This song is trance. Eww."
end