Sectionย 2. Chapterย 4
single
Challenge: Infinite Sequence Generator
Swipe to show menu
Task
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
Everything was clear?
Thanks for your feedback!
Sectionย 2. Chapterย 4
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat