$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · easy · #17

What is the correct fix?

def first_upper(words):
    for w in words:
        if w[0].isupper:
            return w
  1. Change w[0] to w[1] in the test
  2. Use w.isupper on the whole word
  3. Return words instead of the count
  4. Change isupper to isupper()
isupper is a method and must be called with ().
Play Problem Solving ▸