Write a program that implements your algorithm from Exercise 3. Exercise 3. Develop an algorithm for a

Question:

Write a program that implements your algorithm from Exercise 3.


Exercise 3.

Develop an algorithm for a simple game of guessing at a secret five-digit code. When the user enters a guess at the code, the program returns two values: the number of digits in the guess that are in the correct position and the sum of those digits. For example, if the secret code is 53840, and the user guesses 83241, the digits 3 and 4 are in the correct position. Thus, the program should respond with 2 and 7. Allow the user to guess a fixed number of times.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: