Challenge: Infinite Sequence Generator
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 2. Kapitel 4
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Suggested prompts:
Can you explain this in simpler terms?
What are some examples related to this topic?
Where can I learn more about this?
Awesome!
Completion rate improved to 6.67
Challenge: Infinite Sequence Generator
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 2. Kapitel 4
single