Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
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

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

=+7 What is the overall cost of the international assignment?

Answered: 1 week ago