The lottery is a game that involves drawing numbers to win a prize. It is…