Python Program For Mathematical Reasoning