Question: 
Write a function that matches a string that has an a followed by zero or one 'b'.


Model's Code:
def text_match_zero_one(text):
    import re
    if re.search(r'a(b)?', text):
        return 'Found a match!'
    else:
        return 'Not matched!'



Sample Correct Code:
import re
def text_match_zero_one(text):
        patterns = 'ab?'
        if re.search(patterns,  text):
                return 'Found a match!'
        else:
                return('Not matched!')


Asserts:
assert text_match_zero_one("ac")==('Found a match!')
assert text_match_zero_one("dc")==('Not matched!')
assert text_match_zero_one("abbbba")==('Found a match!')


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

Test 756 of 974: 571/756 (75.52910052910053%): success