A lottery is a game of chance in which participants can win money or goods.…