A lottery is a game of chance that involves paying money to win a prize.…