A lottery is a game of chance that gives players the opportunity to win prizes,…