Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!