@@ -0,0 +1,728 @@
+# Write a procedure, count_words, which takes as input a string%0A# and returns the number of words in the string. You may consider words%0A# as strings of characters separated by spaces.%0A%0Adef count_words(text):%0A    mark = %22 %22%0A    counter = 1%0A    if not text.strip() or not len(text) %3E 0:%0A        return 0%0A    for w in text:%0A        if w == mark:%0A            counter += 1    %0A    return counter%0A%0Apassage =(%22The number of orderings of the 52 cards in a deck of cards %22%0A%22is so great that if every one of the almost 7 billion people alive %22%0A%22today dealt one ordering of the cards per second, it would take %22%0A%222.5 * 10**40 times the age of the universe to order the cards in every %22%0A%22possible way.%22)%0Aprint count_words(passage)%0A#%3E%3E%3E56%0A%0A%0A

word counting solved