Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which statement correctly distinguishes json.dumps() from json.dump()?" on CodeWiki (https://codewiki.com/practice/mcq/python/checkpoint-4/checkpoint-4-json-destinations/).
Context (verbatim from the page):
"""
Which statement correctly distinguishes json.dumps() from json.dump()?
dumps returns a JSON string; dump writes JSON to a file-like object
dump returns bytes; dumps always writes to disk
They differ only in indentation defaults
"""
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.