Challenge: Infinite Sequence Generator
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
Awesome!
Completion rate improved to 6.67
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