I have a problem where I have to use a function to output the vowels in a word and output how many vowels there are. I just took a computing course at the local college and am new to this whole thing and its going over my head a bit.
I tried but this is what i got when I ran it:
TypeError: vowel() takes 0 positional arguements but 1 was given
My code:
def vowel ():
array = []
counter = 0
for i in word:
if i in ("a","e","i","o","u"):
counter+=1
array.append(i)
return (array, counter)
word = input("Enter your word")
function = vowel(word)
print(function)