lines = File.readlines("text.txt")line_count = lines.sizetext = lines.joinputs "#{line_count} lines"word_count = text.split.lengthputs "#{word_count} words"