From 6bda47fb45788f7464b7846bc58d7b90cc65240f Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Fri, 2 Oct 2015 22:27:57 +0200 Subject: Figures, hints and test cases added/updated for father, grandparent, brother, and sister problems. --- .../family_relations/sister_2/Prolog_sister_01.svg | 312 ++++++++++++++ .../family_relations/sister_2/Prolog_sister_02.svg | 414 ++++++++++++++++++ .../family_relations/sister_2/Prolog_sister_03.svg | 317 ++++++++++++++ .../family_relations/sister_2/Prolog_sister_04.svg | 356 ++++++++++++++++ .../family_relations/sister_2/Prolog_sister_05.svg | 472 +++++++++++++++++++++ .../problems/family_relations/sister_2/common.py | 2 +- prolog/problems/family_relations/sister_2/sl.py | 16 +- 7 files changed, 1880 insertions(+), 9 deletions(-) create mode 100644 prolog/problems/family_relations/sister_2/Prolog_sister_01.svg create mode 100644 prolog/problems/family_relations/sister_2/Prolog_sister_02.svg create mode 100644 prolog/problems/family_relations/sister_2/Prolog_sister_03.svg create mode 100644 prolog/problems/family_relations/sister_2/Prolog_sister_04.svg create mode 100644 prolog/problems/family_relations/sister_2/Prolog_sister_05.svg (limited to 'prolog/problems/family_relations/sister_2') diff --git a/prolog/problems/family_relations/sister_2/Prolog_sister_01.svg b/prolog/problems/family_relations/sister_2/Prolog_sister_01.svg new file mode 100644 index 0000000..9699fb0 --- /dev/null +++ b/prolog/problems/family_relations/sister_2/Prolog_sister_01.svg @@ -0,0 +1,312 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prolog/problems/family_relations/sister_2/Prolog_sister_02.svg b/prolog/problems/family_relations/sister_2/Prolog_sister_02.svg new file mode 100644 index 0000000..5a01b11 --- /dev/null +++ b/prolog/problems/family_relations/sister_2/Prolog_sister_02.svg @@ -0,0 +1,414 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prolog/problems/family_relations/sister_2/Prolog_sister_03.svg b/prolog/problems/family_relations/sister_2/Prolog_sister_03.svg new file mode 100644 index 0000000..1565626 --- /dev/null +++ b/prolog/problems/family_relations/sister_2/Prolog_sister_03.svg @@ -0,0 +1,317 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prolog/problems/family_relations/sister_2/Prolog_sister_04.svg b/prolog/problems/family_relations/sister_2/Prolog_sister_04.svg new file mode 100644 index 0000000..538be61 --- /dev/null +++ b/prolog/problems/family_relations/sister_2/Prolog_sister_04.svg @@ -0,0 +1,356 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prolog/problems/family_relations/sister_2/Prolog_sister_05.svg b/prolog/problems/family_relations/sister_2/Prolog_sister_05.svg new file mode 100644 index 0000000..be58f2a --- /dev/null +++ b/prolog/problems/family_relations/sister_2/Prolog_sister_05.svg @@ -0,0 +1,472 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prolog/problems/family_relations/sister_2/common.py b/prolog/problems/family_relations/sister_2/common.py index 6c48b00..b2bf954 100644 --- a/prolog/problems/family_relations/sister_2/common.py +++ b/prolog/problems/family_relations/sister_2/common.py @@ -153,4 +153,4 @@ def hint(program, solved_problems): if engine_id: prolog.engine.destroy(engine_id) - return None + return [] diff --git a/prolog/problems/family_relations/sister_2/sl.py b/prolog/problems/family_relations/sister_2/sl.py index 8c4c60f..1cb457d 100644 --- a/prolog/problems/family_relations/sister_2/sl.py +++ b/prolog/problems/family_relations/sister_2/sl.py @@ -13,27 +13,26 @@ description = '''\ plan = [ '''\ -

''', +

Sestra je ženskega spola in ima skupnega starša z Y.

''', '''\ -

''', +

Če je X ženska in če imata X in Y skupnega starša, +potem je X sestra od Y.

''', '''\ -

-
-parent(P, X)
-parent(P, Y)
-female(X)
-
''' +

Sestra X je ženskega spola in ima vsaj enega skupnega starša z Y.

''', ] hint = { 'x_y_must_be_different': '''\ +

Si pomislil, da sta X in Y lahko ista oseba? Poskusi naslednjo poizvedbo:

 ?- sister(sally, Y).
 
+

VEČ... Kako naredim, da sta X in Y različna?

''', 'x_must_be_female': '''\ +

Sestra je navadno ženskega spola.

''', @@ -42,6 +41,7 @@ hint = { ''', 'common_parent_needed': '''\ +

Dobro bi bilo, da imata X in Y vsaj enega skupnega starša.

''', } -- cgit v1.2.1