Thank you Astral. I've gotten it a while back. My solution is below :)
Write a program that uses a for-loop to ask a user to enter 5 words. The program will then display all the words entered that starts with a vowel only. Your program must use the function start_vowel defined in Question 5 .
Sample output:
Enter a word : Apple
Enter a word : eagle
Enter a word : horse
Enter a word : Hamster
Enter a word : Ostrich
Word that begins with vowels are ['Apple', 'eagle', 'Ostrich']
#Function
def start_vowel(word):
if word.startswith(('a','e','i','o','u')):
return True
return False
#Main program
wordList = []
for word in range(5):
word = input("Enter a word : ").lower()
if start_vowel(word):
wordList.append(word)
else:
pass
print("Word that begins with vowels are {} ".format(wordList))