Question: Write a Python program that will take a string consisting of only A, B and C's uppercase and lowercase mixed sequence from the user.
Write a Python program that will take a string consisting of only A, B and C's uppercase and lowercase mixed sequence from the user. Your progra should generate a dictionary having "A", "B", "C" as the keys and the frequency of "uppercase of key" in the string as the first indexed value, the frequency of "lowercase of key" in the string as the second indexed value and the summation of both the frequency as the third indexed value a list as the values. Last of all, your program should check if there are any pairs that are the best match, by comparing the total frequency. Sample Input 1 AaBbbbCcCc Sample Output 1 { "A": [1, 1, 2] "B": [1, 3, 4] "C": [2, 2, 4] } B and C are the best match.
Step by Step Solution
There are 3 Steps involved in it
Heres a Python program that takes a string as input generates a dictionary as specified and checks f... View full answer
Get step-by-step solutions from verified subject matter experts
