Answer
randrange(10, 50)
Work Step by Step
Python also provides another function:
randrange(a, b) is for generating a random integer between a and b – 1, which is equivalent to randint(a, b – 1).
Since randint is more intuitive, the book generally uses randint in the examples.