Lottery is a form of gambling where people purchase tickets in order to win cash…