Skip to content

Commit

Permalink
Update 10.5.5 Contains a Vowel
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeHS-Solutions authored Jan 20, 2024
1 parent 1117aab commit 8712629
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Unit 10: Strings/10.5 The in Keyword/10.5.5 Contains a Vowel
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# use `in` to determine if `word` contains any vowels!
def contains_vowel(word):
vowels = ["a", "e", "i", "o", "u"]
for i in vowels:
for letter in word:
if letter == i:
return True
return False
if("a" in word or "e" in word or "i" in word or "o" in word or "u" in word):
return True
else:
return False

0 comments on commit 8712629

Please sign in to comment.