Question: Write a function called word_count that takes a single argument, a string containing the text of a single chapter, and returns the number of words
Write a function called word_count that takes a single argument, a string containing the text of a single chapter, and returns the number of words in that chapter. Assume that words are separated from each other by spaces. Apply your function to compute the variable wc (defined in the cell below).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
