Your question is Secret vs Guess String Counts. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Tala needs to score a candidate verification string against a secret string. Given two strings of equal length, count characters that match both the value and position, then count remaining characters that exist in the secret but appear at different positions.
Each character occurrence can be matched at most once. Exact matches must be removed before counting misplaced matches, and repeated characters require careful frequency tracking.
Implement score_guess(secret, guess):
secret and guess, with equal length.[exact, misplaced], where exact is the number of matching characters at the same index and misplaced is the number of remaining guess characters that occur elsewhere in secret.Characters are case-sensitive. The input contains only lowercase English letters and digits.
def score_guess(secret, guess):