def print_file(elements, file)
      File.open(file, 'w') do |output|
        elements.each do |line|
          output.print line + "\n"
        end
      end
    end
def print_file(elements, file)
      File.open(file, 'w') do |output|
        elements.each do |line|
          output.print line + "\n"
        end
      end
    end
Prints an array of formatted element string lines gathered by the print() method to file.

 @param [Array<String>] elements an array of formatted element string lines
 @param [String] file a path/file_name string