Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 only

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions

Question

1. Organize and support your main points

Answered: 1 week ago

Question

3. Move smoothly from point to point

Answered: 1 week ago

Question

5. Develop a strong introduction, a crucial part of all speeches

Answered: 1 week ago