From 11efbb77f76902d25a0a4a5ece9145a55205da16 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Tue, 9 Aug 2016 19:21:49 +0200 Subject: English translation for ancestor/2 and descendant/2 updated. --- prolog/problems/family_relations/ancestor_2/en.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'prolog/problems/family_relations/ancestor_2') diff --git a/prolog/problems/family_relations/ancestor_2/en.py b/prolog/problems/family_relations/ancestor_2/en.py index 322ab92..8e253bd 100644 --- a/prolog/problems/family_relations/ancestor_2/en.py +++ b/prolog/problems/family_relations/ancestor_2/en.py @@ -2,7 +2,8 @@ name = 'ancestor/2' slug = 'the ancestor relation' description = '''\ -

ancestor(X, Y): X is an ancestor (parent, grandparent, grandgrandparent, ...) of Y.

+

ancestor(X, Y): X is an ancestor (parent, grandparent, great-grandparent, ...) +of Y.

 ?- ancestor(patricia, X).
   X = john ;
@@ -15,13 +16,16 @@ described with predicates parent/2, male/1, and
 '''
 
 plan = ['''\
-

It's time to use recursion for the first time... how can we transpose the problem to a smaller one (a single step smaller that is)?

-

A parent of someone, who is a parent of Y, is also an ancestor of Y.

+

It's time to use recursion for the first time... how can we transpose the problem to a smaller one +(a single step smaller that is)?

+

A parent of someone, who is a parent of Y,
+is also an ancestor of Y.

''', '''\

If X is a parent of some Z and that Z is an ancestor of Y, then X is also an ancestor of Y.

''', '''\ -

If X is a parent of Z, and Z is an ancestor of Y, then X is also an ancestor of Y.

+

If X is a parent of Z, and Z is an ancestor of Y,
+then X is also an ancestor of Y.

'''] hint = { @@ -63,7 +67,7 @@ one another -- assigned values to variables in one branch do not transfer to the 'only_two_levels_deep': '''\

Your solution is not general enough. An ancestor can also be someone "more steps away" than grandparents, -e.g. grandgrandparents or grandgrandgrandparents are also ancestors.

+e.g. great-grandparents or great-great-grandparents are also ancestors.

''', 'descendant_need_not_be_parent': '''\ -- cgit v1.2.1