Challenge 2: Validated Age Input — Possible Solution ==================================================================== def set_age(age): if age < 0: raise ValueError("Age cannot be negative") return age try: print(set_age(25)) except ValueError as e: print(f"Error: {e}") try: print(set_age(-5)) except ValueError as e: print(f"Error: {e}") Output: 25 Error: Age cannot be negative WHY THIS WORKS AS AN ANSWER ------------------------------ set_age(age) reuses the exact raise ValueError("message") pattern from the chapter's own withdraw() example — if age < 0, it raises a ValueError carrying the specific message "Age cannot be negative" rather than letting some unrelated, less clear error occur later. The first call, set_age(25), never triggers the if age < 0 branch at all, so the function just returns 25 normally, and the try block's print(set_age(25)) runs to completion — the except block is skipped entirely, the same "except only runs if an exception actually occurs" behavior covered throughout the chapter. The second call, set_age(-5), does trigger the raise, so control jumps out of the try block immediately (never reaching a return) and into except ValueError as e:. The as e clause captures the exception object, and the chapter's own f"Error: {e}" pattern extracts its message directly, printing "Error: Age cannot be negative".