Question: 
Write a python function to find the first repeated word in a given string.


Model's Code:
def first_repeated_word(s):
    words = s.split()
    seen = set()
    for word in words:
        if word in seen:
            return word
        seen.add(word)
    return 'None'



Sample Correct Code:
def first_repeated_word(str1):
  temp = set()
  for word in str1.split():
    if word in temp:
      return word;
    else:
      temp.add(word)
  return 'None'


Asserts:
assert first_repeated_word("ab ca bc ab") == "ab"
assert first_repeated_word("ab ca bc") == 'None'
assert first_repeated_word("ab ca bc ca ab bc") == "ca"


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 537 of 974: 396/537 (73.74301675977654%): success