Calc.py: Function and boolean logic support