Exam review Oct 2, 2016 def posUpper(word): for index in range(len(word)): if word[index].isUpper(): return index return -1 def posUpper(word): # DOESN't WORK for index in range(len(word)): if word[index].isUpper(): return index else: return -1 # This solution is wrong, it only # executes the for loop one time. # It looks at the first character, # makes a decision and returns 0 or -1. def posUpper(word): count = 0 for ch in word: if ch.isUpper(): return count count = count + 1 return -1 def posSecondUpper(word) pos = posUpper(word) if pos == -1: return -1 wordpart = word[pos+1:] pos2 = posUpper(wordpart) if pos2 == -1: return -1 return pos + pos2 + 1 example word is loveComputerScience wordpart is omputerScience