This is some part of the code
def count_syllables_in_word(word):
count = 0
...
vowels = "aeiouAEIOU"
prev_char_was_vowel = False
for char in word:
if char in vowels:
if not prev_char_was_vowel:
count = count + 1
prev_char_was_vowel = True
else:
prev_char_was_vowel = False
And and and
It says if not prev_char_was_vowel then this and that but I don't see the connection between this variable and the "vowels" variable. How does the "prev_char_was_vowel" variable know it needs to check if the previous sign is a vowel. I don't see it linked in any way with the "vowels" variable to behave this way.
Clearly I'm not seeing something here. I hope this piece of information is enough for you to understand my question. If not I can write down the whole code Don't judge me too harshly I just started with programming