Fix issue of python 3 ["non-integer arg 1 for randrange()"] since it use...

Fix issue of python 3 ["non-integer arg 1 for randrange()"] since it uses True division for division implementation