Advertisement
ganiyuisholaafeez

Count Method

Feb 11th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. def vowel_count(string):
  2.     lowercase = string.lower()
  3.     counter = lowercase.count("a") + lowercase.count("e") + lowercase.count("i")\
  4.         + lowercase.count("o") + lowercase.count("u")
  5.     return counter
  6.  
  7. print(vowel_count("Estate"))
  8. print(vowel_count("helicopter"))
  9. print(vowel_count("ssh"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement