Loading Teachly…
An AI assistant wrote count_vowels(s) to count how many vowels are in a string, checking each character against an explicit list of vowels in a nested loop. It looks thorough — but that thoroughness is covering for something it never checks.
count_vowels("hello") is 2. count_vowels("xyz") is 0. count_vowels("APPLE") is 2.