A lottery is a form of gambling where people pay a small sum of money…