Isn't c the string that is supposed to be called later on in the code?
I have realized that when it's finding a vowel, it is printing True 6 times, which is the length of the string 'banana'. Same thing goes for when it finds a consonant.
Unlike this code:
def is_vowel(c): for character in c: print(character, True) for character in c: print(character, False)I adjusted it to this code, still giving me the same results.
I have realized that when it's finding a vowel, it is printing True 6 times, which is the length of the string 'banana'. Same thing goes for when it finds a consonant.
Unlike this code:
def is_vowel2(c): for character in c: #The Character in the word defined by the letter "c" if character in vowels: #If this character is in the list "vowels" print(True) #The statement is then a vowel, which is true! else: #If not, or if else print(False) #The statement is false, then it is a consonant!Fortunately, I have to do it both ways (using if conditionals and without using them) so I can actually study both. Help?