courses icon indicating copy to clipboard operation
courses copied to clipboard

Lesson 6.1 grading syntax error

Open paulkm opened this issue 1 month ago • 0 comments

The grading RegEx for exercise 6.1 results in a Python syntax error for escaping the parentheses as the python string formatter attempts to parse the escape sequence before passing it on to the regex parser. The fix is to specify the regex strings as 'raw' like so:

REGEX_CATEGORIES = {
    "A": r"A\) P",
    "B": r"B\) B",
    "C": r"C\) B",
    "D": r"D\) O"
}

paulkm avatar Oct 13 '25 17:10 paulkm