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

Course Content

Python Loops Tutorial

Python Loops Tutorial

1. The for Loop
2. The while Loop
3. Nested Loops

book
Challenge (del)

Task
test

Swipe to show code editor

  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()).

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 7
toggle bottom row

book
Challenge (del)

Task
test

Swipe to show code editor

  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()).

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 7
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt