Section 1. Chapitre 8
single
Challenge: Filter Odd Numbers
Glissez pour afficher le menu
Tâche
Glissez pour commencer à coder
Write a script that filters and prints only the odd numbers from a given list.
- Iterate through the
numberslist. - Check if each element in the list is odd.
- Collect all odd numbers into a new list.
- Print the list of odd numbers.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 8
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion