diff options
author | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-03-14 14:53:25 +0100 |
---|---|---|
committer | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-03-14 14:53:25 +0100 |
commit | 863038d9e8e94420090e5bd86c1b8439cf61eb81 (patch) | |
tree | 693abeefe48422a3b300a1bdca73f2d7d289dfa6 /prolog/problems/lists/divide_3 | |
parent | 4e4623577e05d8394c6840cff6b83d2c4159c29d (diff) |
Plans for divide/3 added.
Diffstat (limited to 'prolog/problems/lists/divide_3')
-rw-r--r-- | prolog/problems/lists/divide_3/common.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/prolog/problems/lists/divide_3/common.py b/prolog/problems/lists/divide_3/common.py index 672f20b..6a94a73 100644 --- a/prolog/problems/lists/divide_3/common.py +++ b/prolog/problems/lists/divide_3/common.py @@ -8,7 +8,7 @@ from server.hints import Hint, HintPopup import server.problems id = 115 -number = 7 +number = 8 visible = True facts = None @@ -28,8 +28,6 @@ hint_type = { 'timeout': Hint('timeout'), '[]_should_not_succeed': Hint('[]_should_not_succeed'), 'list_returned': Hint('list_returned'), - 'clumsy_conc_use': Hint('clumsy_conc_use'), - 'unsuccessful_conc_use': Hint('unsuccessful_conc_use'), } test_cases = [ @@ -80,16 +78,6 @@ def hint(code, aux_code): # recursion is getting bigger and bigger - # using conc, but clumsily: conc(_, X, L) instead of conc(_, [X], L) - if prolog.util.Token('NAME', 'conc') in tokens and \ - prolog.engine.ask_truthTO(engine_id, 'last_elem([q,a,b,c], [q,a,b,c])'): - return [{'id': 'clumsy_conc_use'}] - - # general unsuccessful use of conc, but not specifically detected - # return general_conc hint, not to confuse/force the student into a non-conc solution - if prolog.util.Token('NAME', 'conc') in tokens: - return [{'id': 'unsuccessful_conc_use'}] - # succeeds when asked to return the last element of an empty list if prolog.engine.ask_truthTO(engine_id, 'last_elem([], _)'): return [{'id': '[]_should_not_succeed'}] |