Lottery code for computer science 2