A lottery is a gambling game in which participants pay a small amount for a…