Replace randint() with randrange().