mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-22 19:02:54 -04:00
fix: replace values with vowels (#65147)
This commit is contained in:
committed by
GitHub
parent
7e70a10163
commit
4f0231c6bc
@@ -144,7 +144,7 @@ for word in words:
|
||||
print(f"'{word}' has no vowels")
|
||||
```
|
||||
|
||||
In this example we have a list of random words, and a `for` loop is used to loop through each word. Inside the outer `for` loop, we have another `for` loop to loop through each letter of each word. If the lowercase version of the letter is a vowel, we print the word followed by what vowels it contains, then break out of the inner loop. If the word contains no values, then we print a message indicating that.
|
||||
In this example we have a list of random words, and a `for` loop is used to loop through each word. Inside the outer `for` loop, we have another `for` loop to loop through each letter of each word. If the lowercase version of the letter is a vowel, we print the word followed by what vowels it contains, then break out of the inner loop. If the word contains no vowels, then we print a message indicating that.
|
||||
|
||||
Here is what the result looks like in the console:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user