From 863038d9e8e94420090e5bd86c1b8439cf61eb81 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Mon, 14 Mar 2016 14:53:25 +0100 Subject: Plans for divide/3 added. --- prolog/problems/lists/divide_3/common.py | 14 +------------- 1 file changed, 1 insertion(+), 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'}] -- cgit v1.2.1