09 Jun Question Modify your version of the project to the following specifications.
Question
Modify your version of the project to the following specifications.
1) Randomly generate a code to break in the range of 0000 to 9999. Use characters not integers.
2) Include an option which test all possible guesses instead of playing the game. A table will be generated which is 10,000 long with a guess starting at characters 0000 to 9999 incrementing by 1 each time.
a) The test will loop and test all possible guesses against your randomly chosen code.
b) Print the following headings
Code Guess #right #right in wrong spot Sum
Example: A code was randomly chosen such as 0120
Code Guess #right #right in wrong spot Sum
0120 0000 2 0 2
0120 0001 1 2 3
0120 0002 1 2 3
0120 0003 1 1 2
etc………….
0120 0012 1 3 4
etc……….
0120 0120 4 0 4
etc……….
0120 2100 2 2 4
etc……
0120 9999 0 0 0
This is to make sure you are not double counting. The max in any column can be no greater than 4 and the sum can never be greater than 4. Of course, just because that is true does not mean it is totally correct. That is why further checks are required.
Answer the following and check with your modified project.
3) How many times should 4 right come up?
4) How many times should 3 right come up?
5) How many times should 2 right come up?
6) How many times should 1 right come up?
7) How many times should 0 right come up?
8) Answer the same for number right in the wrong spot like 3) to 7) from above. Answer the same 3) to 7) for the sum.
9) Does your code verify this?
10) Include an option where you can put in the code to test instead of randomly generating the code. Output the same table as above. Do the same comparison.
code
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
