Try to search your question here, if you can't find : Ask Any Question Now ?

How do you find out how many vowels are in a word?

HomeCategory: stackoverflowHow do you find out how many vowels are in a word?
bhawya asked 2 weeks ago

I have a love calculator that shows how much name1 and name2 are in love (out of 100%), depending if the number of vowels match or not. Here is my code so far:

name1 = input("Please type Name 1.n")
name2 = input("Please type Name 2.n")
vowels1 = 0
vowels2 = 0
VOWELS = 'aeiou'
def up_it(word):
    letters = []
    for letter in name1:
        if letter.lower() in VOWELS:
            vowels1 = 1+vowels1 
print("You have",vowels1,"vowels.")

It doesn’t show how many vowels there are in name1. How do you make it so that it does show how many vowels are in name1?

1 Answers
Best Answer
Amit answered 2 weeks ago
Your Answer

7 + 2 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com