Challenge 1: Safe Division Function — Possible Solution ==================================================================== def safe_divide(a, b): try: return a / b except ZeroDivisionError: return None print(safe_divide(10, 2)) print(safe_divide(10, 0)) Output: 5.0 None WHY THIS WORKS AS AN ANSWER ------------------------------ try: return a / b reuses the chapter's own 10 / 0 example almost exactly, wrapped inside a function this time. When b is 2, the division completes normally and the try block's return statement runs immediately, returning 5.0 — the except block is never even reached. When b is 0, Python raises a ZeroDivisionError partway through evaluating a / b, exactly the exception type demonstrated in the chapter's first try/except example. Execution jumps straight to except ZeroDivisionError:, which returns None instead of letting the exception propagate and crash the program. Returning None specifically (rather than, say, printing an error message from inside the function) keeps safe_divide usable as a normal expression — callers can check "did this return None?" to detect the failure case, rather than the function forcing its own error-reporting behavior on every caller.