Lottery is a form of gambling that involves buying a ticket and selecting a group…