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
Suggested prompts:
Can you explain this in simpler terms?
What are some examples related to this topic?
Where can I learn more about this?
Génial!
Completion taux amélioré à 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