Lottery is a gambling game that's used to raise money. The word derives from Middle…