there seem to bee a problem in this python code
which i don't know were is it
simple vowel counter code
vowels = ['a','i','e','o','u']
while(True):
print("\n\n\n\n\n\n")
numOfVowels = 0
Word = input("Please Enter a word to count vowles in it:")
for letter in Word:
if (letter in vowels):
numOfVowels+=1;
print("There is a " + str(numOfVowels) + " vowel letter in the word")
choice = input("would you like a vowels summary: (y/n) : ")
if(choice == 'y'):
for i in Word:
if (i in vowels):
num = Word.find(i)
if(num > 0):
print("number of " + i + " is " + str(num) )
elif(choice == 'n'):
print("OK \n ")
What I have tried:
vowels = ['a','i','e','o','u']
while(True):
print("\n\n\n\n\n\n")
numOfVowels = 0
Word = input("Please Enter a word to count vowles in it:")
for letter in Word:
if (letter in vowels):
numOfVowels+=1;
print("There is a " + str(numOfVowels) + " vowel letter in the word")
choice = input("would you like a vowels summary: (y/n) : ")
if(choice == 'y'):
for i in Word:
if (i in vowels):
num = Word.find(i) #each letter counter
if(num > 0):
print("number of " + i + " is " + str(num) )
# print("number of a is " + str(Wo) )
elif(choice == 'n'):
print("OK \n ")