Python: 2 Conditions - Read in characters Until x, and Count Vowels

Specification: Read in characters until the user enters a full stop '.'. Show the number of lowercase vowels.

So far, I've succeeded in completing the read loop and printing out 'Vowel Count: '. However, vowel count always comes to 0. I've just started. I'm struggling with placement for 'Show the number of lowercase vowels' Should I define vowels = ... at the top? Or put it in a loop later? Do I create a new loop? I haven't been able to make it work. Thanks

c = str(input('Character: '))
count = 0

while c != '.':
        count += 1
        c = str(input('Character: '))

print("Vowel count =", count)


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation