summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-02-29 01:07:53 +0100
committerAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2016-02-29 01:07:53 +0100
commit5d7775da938396b90166958a0908339f6b437b0c (patch)
treee5dec0ac981e8a85b6d4d325aec9e37aab42f358
parent73b899272899bc30f92e0032f96cc3f40c7925a7 (diff)
Final hint added for sister/2.
-rw-r--r--prolog/problems/family_relations/sister_2/common.py3
-rw-r--r--prolog/problems/family_relations/sister_2/sl.py6
2 files changed, 8 insertions, 1 deletions
diff --git a/prolog/problems/family_relations/sister_2/common.py b/prolog/problems/family_relations/sister_2/common.py
index 8493007..456ee97 100644
--- a/prolog/problems/family_relations/sister_2/common.py
+++ b/prolog/problems/family_relations/sister_2/common.py
@@ -28,6 +28,7 @@ hint_type = {
'neq_used_too_early': Hint('neq_used_too_early'),
'neq+_instead_of_neq': Hint('neq+_instead_of_neq'),
'predicate_always_false': Hint('predicate_always_false'),
+ 'final_hint': Hint('final_hint'),
}
test_cases = [
@@ -57,7 +58,7 @@ def test(code, aux_code):
if engine_id:
prolog.engine.destroy(engine_id)
- hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}]
+ hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}, {'id': 'final_hint'}]
return n_correct, len(test_cases), hints
def hint(code, aux_code):
diff --git a/prolog/problems/family_relations/sister_2/sl.py b/prolog/problems/family_relations/sister_2/sl.py
index a1cf5c0..16ae999 100644
--- a/prolog/problems/family_relations/sister_2/sl.py
+++ b/prolog/problems/family_relations/sister_2/sl.py
@@ -70,4 +70,10 @@ ko naleti na primerjavo.</p>
<p>Če je ime pravilno, se morda splača preveriti tudi, če se nisi zatipkal kje drugje,
je morda kakšna pika namesto vejice ali obratno, morda kakšna spremenljivka z malo začetnico?</p>
''',
+
+ 'final_hint': '''\
+<p>Pri tej nalogi si uporabil operator \==. Ta preverja, če njegova operanda nista enaka točno v tistem
+trenutku, ko prolog naleti nanj. Če ga daš na začetek svoje rešitve, ta ne deluje kot bi si želel.
+(Če želiš, lahko to seveda preveriš.)</p>
+''',
}