Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def vowels(*args):
- if(newstring[i] == 'a' or newstring[i] == 'e' or newstring[i] == 'i' or newstring[i] == 'o' or newstring[i] == 'u' or newstring[i] == 'y' or newstring[i] == 'A' or newstring[i] == 'E' or newstring[i] == 'I' or newstring[i] == 'O' or newstring[i] == 'U' or newstring[i] == 'Y'):
- return True
- else:
- return False
- #Main function
- count = 0
- newstring = input("Enter the string to get the results from: ")
- for i in range(0,len(newstring)):
- #Calling in the function
- vowels()
- if(vowels() == True):
- count = count + 1
- elif(vowels() == False):
- continue
- print('Number of vowels in "', newstring, '": ', count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement