Advertisement
Guest User

Untitled

a guest
Jul 24th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. word = input("Please enter some text:")
  2. chars = ["t", "k", "r", "w", "q"]
  3. for char in chars:
  4.     count = word.count(char)
  5.     print(count)
  6.  
  7.  
  8.  
  9.  
  10.  
  11. """
  12. count = word.count('t')
  13. print(count)
  14. word2 = word
  15. count = word2.count('k')
  16. print(count)
  17. word3 = word
  18. count = word3.count('r')
  19. print(count)
  20. word4 = word
  21. count = word4.count('w')
  22. print(count)
  23. word5 = word
  24. count = word5.count('q')
  25. print(count)
  26. """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement