You can download this code by clicking the button below.
This code is now available for download.
Generate a random integer between the specified range.
Technology Stack : random.randint
Code Type : Function
Code Difficulty :
import random
def generate_random_number(start, end):
"""
Generate a random number between start and end (inclusive).
:param start: The lower bound of the range (inclusive).
:param end: The upper bound of the range (inclusive).
:return: A random number between start and end.
"""
return random.randint(start, end)