+ 2

No action in a course

Hi, I've been stuck in Python Data Structures at 3.2 Practice, "How Many Vowels?". I've done it well but no action. What happens?

6th Nov 2021, 4:47 PM
Andrei Shanko
Andrei Shanko - avatar
7 ответов
+ 2
Yes, of course. This is the code vowels = set('aeiouAEIOU') counter_vowels = [] text = 'python is great, its awesome!' for i in text: if i in vowels: counter_vowels.append(i) print(len(counter_vowels))
6th Nov 2021, 4:57 PM
Andrei Shanko
Andrei Shanko - avatar
+ 2
Thanks, mate!
6th Nov 2021, 5:17 PM
Andrei Shanko
Andrei Shanko - avatar
+ 1
Did you print the count of vowels at the end?
6th Nov 2021, 4:55 PM
Neethu Nath
Neethu Nath - avatar
+ 1
You have to take the string as input and count the number of vowels. The variable 'text' should be input.
6th Nov 2021, 5:09 PM
Neethu Nath
Neethu Nath - avatar
+ 1
Change line 3: text = input() This is the only error
6th Nov 2021, 5:12 PM
Neethu Nath
Neethu Nath - avatar
+ 1
str = input() count = 0 for c in str : if(c=='a' or c=='e' or c=='i' or c=='o' or c=='u' or c=='A' or c=='E' or c=='I' or c=='O' or c=='U'): count += 1 print(count)
20th Nov 2021, 11:47 AM
Stefan Bartl
Stefan Bartl - avatar
0
Здравствуйте
7th Nov 2021, 8:07 PM
Фариза Фариза