Skip to content

ogc16/txt-word-count

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

txt-word-count

Sololearn practice You are given a books.txt file, which includes book titles, each on a separate line. Create a program to output how many words each title contains, in the following format: Line 1: 3 words Line 2: 5 words ...

Make sure to match the above mentioned format in the output. To count the number of words in a given string, you can use the split() function, or, alternatively, count the number of spaces (for example, if a string contains 2 spaces, then it contains 3 words).

About

Sololearn practice

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages