I have a homework assignment to create this function. Here is my code:
def countVowelsOdd(n):
length = len(n)
count = 0
for i in range(length):
if i % 2 != 0:
if n[i] == "a" or "A" or "e" or "E" or "i" or "I" or "o" or "O" or "u" or "U":
count = count + 1
return count
Here is the output vs the expected output for this function: https://i.stack.imgur.com/R419V.png