divide_or_report(a, b) that returns the string str(a / b) if b is not zero, or the exact message "Error: cannot divide by zero" if b is zero. This mirrors how CLI tools should print friendly errors instead of letting ZeroDivisionError crash the program.divide_or_report(10, 2)
'5.0'
10 / 2 = 5.0, converted to string.
divide_or_report(5, 0)
'Error: cannot divide by zero'
Division by zero is caught and reported.
Check `b == 0` before dividing, or catch ZeroDivisionError.
Convert the successful result to a string with str().