Challenge
PastOne concept, three rungs. Reaching rung 1 is the goal, so climb as far as you can.
Hunting For Vowels
strings + counting letters
Count the vowels
Write a function called count_vowels
The vowels are a, e, i, o and u. Return how many vowels are in the word. All words are written in small letters.
Examples
| Input | Output |
|---|---|
| "hello" | 2 |
| "" | 0 |
| "sky" | 0 |
| "aeiou" | 5 |
There are extra hidden tests, so make it work in general, not just for these.
Take the vowels out
Write a function called remove_vowels
Return the word with every vowel removed. The other letters stay in the same order, so "hello" becomes "hll".
Examples
| Input | Output |
|---|---|
| "hello" | "hll" |
| "" | "" |
| "sky" | "sky" |
| "aeiou" | "" |
There are extra hidden tests, so make it work in general, not just for these.
Vowels in a row
Write a function called longest_vowel_streak
Find the longest group of vowels that sit next to each other and return how many letters that group has. In "beautiful" the letters eau are together, so the answer is 3.
Examples
| Input | Output |
|---|---|
| "hello" | 1 |
| "aeiou" | 5 |
| "sky" | 0 |
| "" | 0 |
There are extra hidden tests, so make it work in general, not just for these.
Finish Rung 1 and today counts. Rungs 2 and 3 are there if you want to push further.