diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564f834dd717998092cfd47.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564f834dd717998092cfd47.md index 5f24edf2264..410c449d0b2 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564f834dd717998092cfd47.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564f834dd717998092cfd47.md @@ -11,10 +11,16 @@ After your new comment, write a `for` loop to iterate over the `constraints` lis # --hints-- -You should write a `for` loop to iterate over the `constraints` list with `constraint` and `pattern`. +You should write a `for` loop to iterate over the `constraints` list. ```js -assert.match(code, /for\s+constraint\s*,\s*pattern\s+in\s+constraints\s*:/) +({ test: () => assert(runPython(`_Node(_code).find_function("generate_password").find_whiles()[0].find_bodies()[0].find_for_loops()[1].find_for_iter().is_equivalent("constraints")`)) }) +``` + +Your `for` loop should use `constraint` and `pattern` as the loop variables to iterate over the `constraints` list. + +```js +({ test: () => assert(runPython(`_Node(_code).find_function("generate_password").find_whiles()[0].find_bodies()[0].find_for_loops()[1].find_for_vars().is_equivalent("constraint, pattern")`)) }) ``` # --seed-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564fd78ffff909b1531d3c3.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564fd78ffff909b1531d3c3.md index 29e6ef008b3..e10f24ae7de 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564fd78ffff909b1531d3c3.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-regular-expressions-by-building-a-password-generator/6564fd78ffff909b1531d3c3.md @@ -51,6 +51,7 @@ def generate_password(length, nums, special_chars, uppercase, lowercase): --fcc-editable-region-- # Check constraints for constraint, pattern in constraints: + pass --fcc-editable-region-- return password