Mathematical solution with the theorem of Pythagoras A simple script that solves a problem using the theorem of Pythagoras.