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
course content

Conteúdo do Curso

Python Loops Tutorial

Python Loops Tutorial

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

Challenge

Tarefa

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

Tarefa

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

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 3. Capítulo 7
toggle bottom row

Challenge

Tarefa

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

Tarefa

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

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 3. Capítulo 7
toggle bottom row

Challenge

Tarefa

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

Tarefa

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

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Tarefa

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

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. Capítulo 7
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt