Reference no: EM132285586
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
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.
Information related to above question is enclosed below:
Attachment:- Code and Example.rar