Home / Expert Answers / Computer Science / in-this-problem-you-will-create-a-function-called-lottodraw-that-generates-a-list-of-six-digits-a-pa599

# (Solved): In this problem, you will create a function called lottoDraw, that generates a list of six digits, a ...

In this problem, you will create a function called lottoDraw, that generates a list of six digits, at random, between 1-50. Create a second function, lottoPick, that prompts the user to input 6 numbers, each between 1-50. This will be the player’s “pick”. Entering ‘q’ should end the program, printing (well-formatted) the total amount left in the player’s “wallet”. Your program should use a function, compareResults, to compare the random draw to the player’s pick, and determine how many digits match. Order does not matter; it is the number of matching values that generates rewards. Assigns rewards according to this scheme: \$100,000 if 5 match \$100 if 4 match \$7 if 3 match \$7 if 2 match \$4 if 1 matches \$0 if no match Each player should start with \$10 in their wallet. Each time the game is run, subtract \$2 from the player’s “wallet” and handle the rewards based on the outcome. Once the player’s “wallet” is down to \$0, the game ends and the player is notified that they are out of money. There is no limit to the number of functions you can create to make this game work, but it should, at a minimum, have lottoPick, lottoDraw, compareResults, each passing whichever arguments make sense for your implementation.

We have an Answer from Expert