From 138610b0709d6e251c16b391242023eec393d775 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 15 Feb 2016 20:17:49 +0100 Subject: Prolog: add a graph of family relations --- prolog/problems/family_relations/cousin_2/sl.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'prolog/problems/family_relations/cousin_2') diff --git a/prolog/problems/family_relations/cousin_2/sl.py b/prolog/problems/family_relations/cousin_2/sl.py index a5f2b92..5b82305 100644 --- a/prolog/problems/family_relations/cousin_2/sl.py +++ b/prolog/problems/family_relations/cousin_2/sl.py @@ -4,12 +4,17 @@ name = 'cousin/2' slug = 'X je bratranec ali sestrična od Y' description = '''\ -

cousin(?X, ?Y): X je bratranec ali sestrična od Y.

+

cousin(?X, ?Y): X je bratranec ali sestrična od +Y.

-?- cousin(andrew, X).
-  X = vanessa ;
-  X = patricia.
-
''' +?- cousin(andrew, Y). + Y = vanessa ; + Y = patricia. + +

Družinska drevesa so +podana s predikati parent/2, male/1 in +female/1.

+''' plan = ['''\

Verjetno bi se sedaj splačalo uporabiti rešitev kakšne prejšnje naloge?

-- cgit v1.2.1