Guest User

Untitled

a guest
Jan 25th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. """
  2. This program counts the number of characters in a block of text you paste
  3. """
  4. count = 0
  5. text = raw_input("Enter text here: ")
  6. for i in text:
  7. if i == " ":
  8. count += 1
  9. else:
  10. pass
  11. word_count = count + 1
  12.  
  13. print "There are " + str(word_count) + " words in that text"
Advertisement
Add Comment
Please, Sign In to add comment