Skip to content

Commit 16302af

Browse files
committed
Fix count_vowels function to handle uppercase letters by converting input to lowercase
1 parent 4631a91 commit 16302af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/data/python.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"code": [
3636
"def count_vowels(s):",
3737
" vowels = 'aeiouAEIOU'",
38-
" return len([char for char in s if char in vowels])",
38+
" return len([char for char in s.lower() if char in vowels])",
3939
"",
4040
"# Usage:",
4141
"print(count_vowels('hello')) # Output: 2"

0 commit comments

Comments
 (0)