Description
Write a Python program to implement the Code Cracking Game:
i. The program randomly generates a 5-digit code with each digit being 0-9 without repetition. (Hint: Use the function randint().)
ii. This secret code is always hidden from the user.
iii. The user keeps guessing the secret code by entering 5 digits until she guesses the code correctly.
iv. After each guessing, the program gives a hint to the user, which is constructed in the following way: if the user guesses both the digit and its position correctly then she gets one “P”; if she guesses only the digit correctly but not its position then she gets one “D”. The hint is written in the form of “mPnD”, where m and n are the total number of P’s and D’s, respectively, the user gets. For example, suppose the secret code is “03491” and the user’s guess is “23974”. Then the hint is “1P2D”.
Kimberly Yagovane –
Solution I got is great! Before deadline and is great with changes
Chris Sims –
I was very happy with everything in my assignment that I have reviewed. I have got great price and professional work
Doug Okruch –
I highly recommend this website. It is definitely the best.
Jasmyne Nall-Perkins –
Work was finished long before due and tutor was considerate and engaging. Perfect!
Narayana Rao –
Great job, very quick and informative! Done in an hours! Thank you for a job well done.