Challenge: Infinite Sequence Generator
Tâche
Swipe to start coding
Write a generator function infinite_multiples(k) that yields multiples of k indefinitely.
- The generator must start with
kand yield each subsequent multiple by addingkto the previous value. - The generator must continue to yield values endlessly, without stopping.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 4
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
Awesome!
Completion rate improved to 6.67
Challenge: Infinite Sequence Generator
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write a generator function infinite_multiples(k) that yields multiples of k indefinitely.
- The generator must start with
kand yield each subsequent multiple by addingkto the previous value. - The generator must continue to yield values endlessly, without stopping.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 2. Chapitre 4
single