Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge | Nested Loops
Python Loops Tutorial

ChallengeChallenge

Завдання

  1. Initialize i.
  2. Configure the outer while loop to operate on the text.
  3. Initialize u.
  4. Establish the condition if an element is a letter.
  5. Configure the inner while loop to operate on vowels.
  6. Implement the condition if a letter from the text is found in vowels, then append it to text_vowels.
  7. Increment u.
  8. If the letter from the text is not found in vowels, then append it to text_consonants.
  9. If the element is not a letter, then append it to text_symbols.

Note

To determine whether a character is an alphabetic letter, you can utilize the .isalpha() method associated with a character (e.g., 'c'.isalpha()).

Все було зрозуміло?

Секція 3. Розділ 7
toggle bottom row
course content

Зміст курсу

Python Loops Tutorial

ChallengeChallenge

Завдання

  1. Initialize i.
  2. Configure the outer while loop to operate on the text.
  3. Initialize u.
  4. Establish the condition if an element is a letter.
  5. Configure the inner while loop to operate on vowels.
  6. Implement the condition if a letter from the text is found in vowels, then append it to text_vowels.
  7. Increment u.
  8. If the letter from the text is not found in vowels, then append it to text_consonants.
  9. If the element is not a letter, then append it to text_symbols.

Note

To determine whether a character is an alphabetic letter, you can utilize the .isalpha() method associated with a character (e.g., 'c'.isalpha()).

Все було зрозуміло?

Секція 3. Розділ 7
toggle bottom row
some-alt