Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #Vowel Function
  2. def vowel_count(string):
  3.     """This function will count and returns the number of vowels in the string argument"""
  4.     string = string.lower() #This will convert the string argument to lowercase if it contain an uppercase(s)
  5.     count = 0
  6.     for i in string:
  7.         if(i=="a" or i=="e" or i=="i" or i=="o" or i=="u"):
  8.             count +=1
  9.     return count
  10. vowels = vowel_count("bockarie")
  11. print(vowels)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement