Python3 program to implement recursive randomized algorithm . To generate random number between x and y ie . . [ x , y ]
import random NEW_LINE def getRandom ( x , y ) : NEW_LINE INDENT tmp = ( x + random . randint ( 0 , 100000 ) % ( y - x + 1 ) ) NEW_LINE return tmp NEW_LINE DEDENT