Question: 
Write a function to find sequences of lowercase letters joined with an underscore using regex.


Model's Code:
import re

def text_match(text):
    pattern = r'^[a-z]+_[a-z]+$'
    if re.match(pattern, text):
        return 'Found a match!'
    else:
        return 'Not matched!'



Sample Correct Code:
import re
def text_match(text):
  patterns = '^[a-z]+_[a-z]+$'
  if re.search(patterns,  text):
    return ('Found a match!')
  else:
    return ('Not matched!')


Asserts:
assert text_match("aab_cbbbc") == 'Found a match!'
assert text_match("aab_Abbbc") == 'Not matched!'
assert text_match("Aaab_abbbc") == 'Not matched!'


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

Test 43 of 974: 33/43 (76.74418604651163%): success