Create volfun.py

Borrowed Leonidas' code. Might combine with number.py since they have to be used in conjunction.