+ 2
Accessing Strings, python data structures
You need to make a program that counts the number of vowels in a given text. The vowels are a, e, i, o, and u. Take a string as input and output the number of vowels. Sample Input: this is great Sample Output: 4 My code: text = input() vowels = "a", "e", "i", "o", "o" count = 0 for x in text.lower(): if x in vowels: count += 1 print(count) Test case 3 won't accept my code. Why?
2 Antworten
+ 4
Double "o". You missing "u".
+ 2
Thank you my brain is a bit goofy today