diff --git a/challenge3.py b/challenge3.py index bf139e8..eb5919c 100644 --- a/challenge3.py +++ b/challenge3.py @@ -21,7 +21,13 @@ for key,value in tableOfPossibleAnswers.items(): # find the highest value and return it and its corresponding key maxValue = max(weightedCodes.values()) +answerValue = [] for key in weightedCodes: if weightedCodes[key] == maxValue: - print(key, weightedCodes[key]) - \ No newline at end of file + answerValue = key + +# now i need to use that to key into the original tableOfPossibleAnswers to return the answer and the decryption key. + +for key,value in tableOfPossibleAnswers.items(): + if tableOfPossibleAnswers[key] == answerValue: + print(key, tableOfPossibleAnswers[key]) \ No newline at end of file