A lottery is an arrangement in which prizes, or "lots," are allocated by chance. Often,…