From 04df55fae1bd1a26edcdfb702a24066ce49f5461 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 24 Feb 2017 16:33:09 +0100 Subject: Prolog: add tags for sister/2 hints --- prolog/problems/family_relations/sister_2/en.py | 8 +++++--- prolog/problems/family_relations/sister_2/sl.py | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/prolog/problems/family_relations/sister_2/en.py b/prolog/problems/family_relations/sister_2/en.py index cbd975b..46babf0 100644 --- a/prolog/problems/family_relations/sister_2/en.py +++ b/prolog/problems/family_relations/sister_2/en.py @@ -45,8 +45,9 @@ For example: X \== Y

''', 'neq+_instead_of_neq': '''\ -

Use the operator \== instead of operators \= or =\=. It succeeds when the two operands are not the same, -while \= succeeds if the operands cannot be made the same (cannot be unified), and =\= checks for +

Use the operator \== instead of operators \= or =\=. +It succeeds when the two operands are not the same, +while \= succeeds if the operands cannot be made the same (cannot be unified), and =\= checks for arithmetic inequality and in this case both operands should be immediately arithmetically computable.

''', @@ -75,7 +76,8 @@ something similarly impossible).

''', 'final_hint': '''\ -

In this exercise you used the \== operator. It succeeds if its two operands are not the same +

In this exercise you used the \== (or \=) operator. +It succeeds if its two operands are not the same at the moment of comparison. If you put this goal at the start of your rule, it will not work as expected. (Go ahead, try and see what happens!)

''', diff --git a/prolog/problems/family_relations/sister_2/sl.py b/prolog/problems/family_relations/sister_2/sl.py index d0c81c2..7cd8c2a 100644 --- a/prolog/problems/family_relations/sister_2/sl.py +++ b/prolog/problems/family_relations/sister_2/sl.py @@ -44,8 +44,8 @@ Na primer: X \== Y

''', 'neq+_instead_of_neq': '''\ -

Uporabi raje operator \== namesto operatorjev \= ali =\=. Prvi preveri, da oba operanda nista enaka, -drugi (\=) ju poskusi unificirati (narediti enaka), tretji (=\=) pa je samo za aritmetično primerjanje +

Uporabi raje operator \== namesto operatorjev \= ali =\=. Prvi preveri, da oba operanda nista enaka, +drugi (\=) ju poskusi unificirati (narediti enaka), tretji (=\=) pa je samo za aritmetično primerjanje in morata oba operanda biti takoj izračunljiva aritmetična izraza.

''', @@ -72,7 +72,7 @@ da je X hkrati starš in sestra od Y).

''', 'final_hint': '''\ -

Pri tej nalogi si uporabil operator \==. Ta preverja, če njegova operanda nista enaka točno v tistem +

Pri tej nalogi si uporabil operator \== (oziroma \=). 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š.)

''', -- cgit v1.2.1