Challenge 3: Fix the Forgotten await — Possible Solution ==================================================================== import asyncio async def greet(name): print(f"Hello, {name}!") # --- broken version --- async def main_broken(): greet("Ada") # WRONG — no await, this line does nothing observable print("Running broken version:") asyncio.run(main_broken()) print("(nothing printed above except this line — greet() never ran)") # --- fixed version --- async def main_fixed(): await greet("Ada") print("\nRunning fixed version:") asyncio.run(main_fixed()) Output: Running broken version: (nothing printed above except this line — greet() never ran) Running fixed version: Hello, Ada! (Python will also print a warning to stderr for the broken version, similar to: RuntimeWarning: coroutine 'greet' was never awaited) WHY THIS WORKS AS AN ANSWER ------------------------------ main_broken() reuses this chapter's own warn-box mistake exactly: calling greet("Ada") without await creates a coroutine object (per the chapter's own coro = say_hello() example) and then immediately discards it, since nothing stores it, awaits it, or passes it to gather(). The coroutine's body — the print("Hello, ...") line inside greet — never actually executes, which is why nothing prints between the two "Running..." messages, and why Python separately reports a "coroutine was never awaited" warning: it detected a coroutine object was created and later garbage-collected without ever being run. main_fixed() changes exactly one thing: adding await in front of greet("Ada"). This reuses the chapter's own core rule — await is what actually drives a coroutine's code to run, pausing main_fixed() at that point until greet("Ada") completes. With that single word added, greet's print("Hello, Ada!") line runs correctly and appears in the output. Isolating the fix to one added keyword, with everything else about greet() and the calling code identical, makes the exact cause of the original bug — a missing await, not anything wrong with greet() itself — completely unambiguous.