From 9360424c9992b92efb4ab0c526eeebd722d54a6f Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Sun, 21 Aug 2016 01:46:25 +0200 Subject: English translation for grandparent/2 added. --- .../problems/family_relations/grandparent_2/en.py | 62 +++++++++++++++++++++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/prolog/problems/family_relations/grandparent_2/en.py b/prolog/problems/family_relations/grandparent_2/en.py index 3aa9bfe..b8fca7c 100644 --- a/prolog/problems/family_relations/grandparent_2/en.py +++ b/prolog/problems/family_relations/grandparent_2/en.py @@ -9,6 +9,64 @@ description = '''\ X = patricia. ?- grandparent(tina, vanessa). true. -''' + +

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

+''' -hint = {} +plan = ['''\ +

A grandparent has a child that has a child.

+''', '''\ +

If X is a parent of a parent of Y, +then X is a grandparent of Y.

+''', '''\ +

A grandparent has a child that has a child of
+his or her own.

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

Did you connect X and Y through some common person?

+''', + + 'gender_is_irrelevant': '''\ +

We're looking for a grandparent and a grandchild, the gender is not important.

+''', + + 'gender_is_irrelevant_markup': '''\ +

Is this necessary?

+''', + + 'or_instead_of_and': '''\ +

Did you perhaps use a semicolon (that represents logical OR) instead of a comma (logical AND)?

+''', + + 'x_must_be_parent': '''\ +

A grandparent surely has a child, right? So he or she is a parent of someone...

+

+''', + + 'x_need_not_have_parent': '''\ +

A parent of X is not really important if we're looking for a grandchild...

+''', + + 'y_must_have_parent': '''\ +

A grandchild Y must have a parent, right? And that parent is...

+

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

A grandchild Y doesn't really need to have children...

+''', + + '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).

+''', +} -- cgit v1.2.1