Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Write function, largestCharacterlinputString) that takes as input a string of one or more letters (and no other characters) and prints 1) the largest character
3. Write function, largestCharacterlinputString) that takes as input a string of one or more letters (and no other characters) and prints 1) the "largest" character in the string, where one character is larger than another if it occurs later in the alphabet thus is larger thanand both are larger than b ) and 2 the index of the final occurren0 of that character when comparing letters in this probiem, ignore case. Le.' and 'E should be treated as oqual. Howover, your output should use the case of the largest letter as it appears at the index of its final oocurrence in the string. Thus, in the example below The largest character is y would be incorrect mportant your function must contain exactly one loop and you must determine the index of the character within the loop (ie. you may not use Python's max, min, index, reverse,-11, or find, and you may not use any lists). You may, however, use Python's lower) function to help with string case if you wish. Tor exaaple should yield the largest ehar beter is 'Y.nd oeeurs at position 16
Step 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