The lottery is a game in which numbers are drawn to determine winners of prizes.…