From 0a09672a992836c912be80a71b47eaf9bcce2d07 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Fri, 19 Aug 2016 02:05:11 +0200 Subject: English translation for aunt/2 added. --- prolog/problems/family_relations/aunt_2/en.py | 79 ++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/prolog/problems/family_relations/aunt_2/en.py b/prolog/problems/family_relations/aunt_2/en.py index 4314a7a..f8bf35b 100644 --- a/prolog/problems/family_relations/aunt_2/en.py +++ b/prolog/problems/family_relations/aunt_2/en.py @@ -7,6 +7,81 @@ description = '''\ ?- aunt(sally, X). X = vanessa ; X = patricia. -''' + +

Family trees are +described with predicates parent/2, male/1, and +female/1.

+''' + +plan = ['''\ +

Perhaps you can make use of the solution to one of the previous exercises?

+

My sibling has a child...

+''', '''\ +

If X is a sister of the parent of Y, +then X is the aunt of Y.

+''', '''\ +

A sister of Y's parent is the aunt of Y.

+'''] + +hint = { + 'x_and_y_mixed_up': '''\ +

X should be the aunt of Y, not the other way around.

+''', + + 'precedence_fail': '''\ +

Did you mix up the precedence of operators or & and?

+

Operator and has higher precedence than operator or. +If you wish to change that you can use brackets (as usual in mathematics).

+''', + + 'x_must_have_sibling': '''\ +

An aunt usually has a sibling...

+

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

An aunt is usually female.

+

+''', # TODO: Loni should mark female gender on some aunt hints! + + 'y_must_have_parent': '''\ +

It would probably make sense if the nephew has a parent, right?

+

+''', + + 'aunt_vs_mother': '''\ +

How can an aunt also be the mother of Y? +Did you forget to specify that an aunt and the parent of Y cannot be the same person?

+

+''', + + 'x_need_not_be_parent': '''\ +

X doesn't need to have children to be somebody's aunt...

+''', + + 'y_need_not_be_parent': '''\ +

A nephew Y doesn't need to have children...

+''', + + 'nephews_parent_can_be_male': '''\ +

A parent of nephew Y can also be male +(which means that this parent cannot be a sister of X).

+''', + + 'predicate_always_false': '''\ +

It seems your predicate is always "false". Did you give it the correct name, +or is it perhaps misspelled?

+

If the name is correct, check whether something else is misspelled, perhaps there is a full stop instead of +a comma or vice versa, or maybe you typed a variable name in lowercase?

+

It is, of course, also possible that your conditions are too restrictive, or even impossible to satisfy +(as would be, for example, the condition that X is both a parent and a sister of Y, or +something similarly impossible).

+''', + + 'interesting_tidbit': '''\ +

Interesting tidbit. This exercise could also be solved using the solution to the sister/2 +relation. An aunt is a sister of some parent of Y.

+

+''', # TODO: only trigger if sister is not part of correct solution +} -hint = {} -- cgit v1.2.1