def prompt(p, yes_no=false)
      puts #newline for newline's sake!

      loop do
        print p, ' '
        line = STDIN.readline.strip
        if yes_no
          return true if line =~ YES
          return false if line =~ NO
        else
          return line
        end
      end
    end
def prompt(p, yes_no=false)
      puts #newline for newline's sake!

      loop do
        print p, ' '
        line = STDIN.readline.strip
        if yes_no
          return true if line =~ YES
          return false if line =~ NO
        else
          return line
        end
      end
    end
Ask the user a yes-or-no question