def find_max_char(a_string): max_found = '' for char in a_string: if char > max_found: max_found = char return max_found
Time is over! You can keep submitting you assignments, but they won't compute for the score of this quiz.
Fix the Max Character
The function provided is broken. Your job is to figure out what's going on and fix it.
Use the tests to guide you.
test find max character - Run Test
def test_find_max_character(): assert find_max_char('arjbo') == 'r' assert find_max_char('ABCDEFGH') == 'H' assert find_max_char('HGFEDCBA') == 'H' assert find_max_char('a') == 'a'