Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "What does calling a generator function do before next() or iteration begins?" on CodeWiki (https://codewiki.com/practice/mcq/python/checkpoint-2/checkpoint-2-generator-start/).
Context (verbatim from the page):
"""
What does calling a generator function do before next() or iteration begins?
It creates a generator object without running the function body
It runs the whole body and stores every yielded value in a list
It runs through the first yield and discards that value
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Python. Where you are unsure, say so.