Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Heres a Python program that takes a string as input generates a dictionary as specified and checks f...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started