A lottery is a game where participants pay a small amount of money for the…