Added monte carlo tests for python
Fixed rounding error