From 4fd77108854d7e83ce2d7135ed02b65ba73fc9e9 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Wed, 9 Mar 2016 20:09:26 +0100 Subject: Hints for del/3 updated. --- prolog/problems/lists/del_3/common.py | 2 +- prolog/problems/lists/del_3/sl.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'prolog/problems/lists/del_3') diff --git a/prolog/problems/lists/del_3/common.py b/prolog/problems/lists/del_3/common.py index c984fef..125ece1 100644 --- a/prolog/problems/lists/del_3/common.py +++ b/prolog/problems/lists/del_3/common.py @@ -84,7 +84,7 @@ def hint(code, aux_code): return [{'id': 'del_from_empty_list_success'}] # missing/failed base case - if not prolog.engine.ask_truthTO(engine_id, 'del(qQ, [qQ,qa,qb,qc], [qa,qb,qc])'): + if not prolog.engine.ask_one(engine_id, 'del(qQ, [qQ,qa,qb,qc], [qa,qb,qc])'): return [{'id': 'base_case'}] # target predicate seems to always be false diff --git a/prolog/problems/lists/del_3/sl.py b/prolog/problems/lists/del_3/sl.py index 0875fe0..ce82732 100644 --- a/prolog/problems/lists/del_3/sl.py +++ b/prolog/problems/lists/del_3/sl.py @@ -76,8 +76,8 @@ saj veš, da z največjim veseljem reče "no"! :)

'lost_heads': '''\

Element je zbrisan, ampak prav tako so tudi vsi elementi pred njim, kajne? Si pozabil dati glavo nazaj na začetek seznama, ko se vračaš iz rekurzije?

-

Poskusi postaviti naslednje vprašanje prologu: -?- del(d, [a,b,c,d,e,f,g], L).

+

Poskusi postaviti naslednje vprašanje prologu:

+

?- del(d, [a,b,c,d,e,f,g], L).

''', 'final_hint': '''\ -- cgit v1.2.1