Answered step by step
Verified Expert Solution
Question
1 Approved Answer
thanks for you helping! NOTE: You may not use any functions from extemal modules loaded by 'import.' In addition, you may not use dictionaries, list
thanks for you helping!
NOTE: You may not use any functions from extemal modules loaded by 'import.' In addition, you may not use dictionaries, list comprehensions, or other Python language features not yet taught in this class. The point of these exercises is to practice very basic components of programming 1. Write a function, q(inputString), that takes as input a string of letters and prints three things: the lexicographically largest largest letter (z/Z> y/Y > the most common letter along with how many times that letter occurs. > a/A), the third largest letter, and When printing the largest and third largest and most common letters, the output can be either lower or upper case so long as the letter appears at least once with that case in the input string. You may not assume that the input string contains at least three different characters (or even any characters at all). Make sure to recognize various situations where fewer than three different letters appear in the string and print something appropriate for those situations If two or more letters tie for most common, you may choose any one of them. For example qly0y In 'aacyYegy004yq,the largest letter is y,the third largest letter is and the most comon letter is q,occurring 5 tines >>>l"bBBbAb) In bBBbAb and the most common letter is b', occurring 5 times the largest letter is b'. there is no third largest letter NOTE: you may not use built-in min, max, sort, or sorted functions (you should also not write your own sorting method). You may not use any built-in string methods (other than .lower). You may use I to access single characters of a string, if you wish. Use one or more simple loops, and simple comparison( -) operators onlyStep by Step Solution
There are 3 Steps involved in it
Step: 1
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