## Introduction to Programming using Python 1st Edition

Python also provides another function, randrange(a, b), for generating a random integer between a and b – 1, which is equivalent to randint(a, b – 1). For example, randrange(0, 20) and randint(0, 20) are the same. Since randint is more intuitive, the book generally uses $randint$ in the examples. You can also use the random() function to generate a random float r such that $0 \leq r$