From 40fb59cc361f927834580c543558b1414bb13490 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Thu, 18 Aug 2016 21:05:22 +0200 Subject: English translation for mother/2 and father/2 added. --- prolog/problems/family_relations/mother_2/en.py | 56 ++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) (limited to 'prolog/problems/family_relations/mother_2') diff --git a/prolog/problems/family_relations/mother_2/en.py b/prolog/problems/family_relations/mother_2/en.py index f8cda9a..7d9de60 100644 --- a/prolog/problems/family_relations/mother_2/en.py +++ b/prolog/problems/family_relations/mother_2/en.py @@ -9,6 +9,58 @@ description = '''\ ?- mother(nevia, X). X = luana ; X = daniela. -''' + +

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

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

A mother is female and has a child.

+''', + '''\ +

Mother X is a parent of Y and is female.

''', + '''\ +

If X is female and X is parent to Y, +then X is a mother of Y.

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

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

+''', + + 'or_instead_of_and_two_rules': '''\ +

Did you perhaps write two rules: one for gender and one for parenthood? +Be careful: this is understood as one or the other, not as one and the other!

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

A mother is usually female.

+

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

A mother is supposed to have at least one child... so she's a parent of somebody.

+

+''', + + 'y_can_be_of_any_gender': '''\ +

Y can be of any gender.

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

Y doesn't 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