Algorithm For Simple Calculator In Python