Contenido del Curso
Python Loops Tutorial
Python Loops Tutorial
Challenge
Swipe to show code editor
- Initialize
i
. - Configure the outer
while
loop to operate on thetext
. - Initialize
u
. - Establish the condition if an element is a letter.
- Configure the inner
while
loop to operate onvowels
. - Implement the condition if a letter from the
text
is found invowels
, then append it totext_vowels
. - Increment
u
. - If the letter from the
text
is not found invowels
, then append it totext_consonants
. - 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()
).
¡Gracias por tus comentarios!
Challenge
Swipe to show code editor
- Initialize
i
. - Configure the outer
while
loop to operate on thetext
. - Initialize
u
. - Establish the condition if an element is a letter.
- Configure the inner
while
loop to operate onvowels
. - Implement the condition if a letter from the
text
is found invowels
, then append it totext_vowels
. - Increment
u
. - If the letter from the
text
is not found invowels
, then append it totext_consonants
. - 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()
).
¡Gracias por tus comentarios!
Challenge
Swipe to show code editor
- Initialize
i
. - Configure the outer
while
loop to operate on thetext
. - Initialize
u
. - Establish the condition if an element is a letter.
- Configure the inner
while
loop to operate onvowels
. - Implement the condition if a letter from the
text
is found invowels
, then append it totext_vowels
. - Increment
u
. - If the letter from the
text
is not found invowels
, then append it totext_consonants
. - 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()
).
¡Gracias por tus comentarios!
Swipe to show code editor
- Initialize
i
. - Configure the outer
while
loop to operate on thetext
. - Initialize
u
. - Establish the condition if an element is a letter.
- Configure the inner
while
loop to operate onvowels
. - Implement the condition if a letter from the
text
is found invowels
, then append it totext_vowels
. - Increment
u
. - If the letter from the
text
is not found invowels
, then append it totext_consonants
. - 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()
).