The lottery is a game in which people pay a small amount of money for…