Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this problem, you will create a function called lottoDraw, that generates a list of six digits, at random, between 1 - 5 0 .
In this problem, you will create a function called lottoDraw, that generates a list of six digits, at random, between Create a second function, lottoPick, that prompts the user to input numbers, each between This will be the players pick Entering q should end the program, printing wellformatted the total amount left in the players wallet Your program should use a function, compareResults, to compare the random draw to the players 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: $ if match $ if match $ if match $ if match $ if matches $ if no match Each player should start with $ in their wallet. Each time the game is run, subtract $ from the players wallet and handle the rewards based on the outcome. Once the players wallet is down to $ 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.
In this problem, you will create a function called lottoDraw, that generates a list of six digits, at random, between
Create a second function, lottoPick, that prompts the user to input numbers, each between This will be the players pick Entering q should end the program, printing wellformatted the total amount left in the players wallet
Your program should use a function, compareResults, to compare the random draw to the players 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:
$ if match
$ if match
$ if match
$ if match
$ if matches
$ if no match
Each player should start with $ in their wallet. Each time the game is run, subtract $ from the players wallet and handle the rewards based on the outcome. Once the players wallet is down to $ 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started