Developing Functions in Python for Time Value