The lottery is a game in which people pay to have a chance to win…