A lottery is a game of chance in which winnings (typically money or prizes) are…