Python · Errors, debugging and testing

Raise an error on bad input

A function that quietly returns a made-up answer for bad input passes the problem on to whoever uses that answer later.