Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 07e6ed2

Browse files
committed
attempt to prevent solutions containing the answer text for the final boss
1 parent 6db3107 commit 07e6ed2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CodeChallenge/api/questions.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,16 @@ def answer_eval():
230230
400,
231231
)
232232

233+
if q.answer in code:
234+
return (
235+
jsonify(
236+
status="error",
237+
reason="your solution may not contain the literal answer. you must submit written code to solve for "
238+
"the answer.",
239+
),
240+
400,
241+
)
242+
233243
try:
234244
language = request.json["language"]
235245
except KeyError:

0 commit comments

Comments
 (0)