Last active
November 27, 2018 13:00
-
-
Save mikalai-yankouski/949b212ec13cb5823c83ef01ca0983ee to your computer and use it in GitHub Desktop.
Дана строка в которой записаны слова через пробел. Необходимо посчитать количество слов.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
random_string = Faker::Lorem.words(10).join(" ") | |
words = random_string.split.count | |
puts "String: #{random_string.inspect}" | |
puts "Words in string: #{words}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment