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. --- prolog/problems/family_relations/grandparent_2/common.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'prolog/problems/family_relations/grandparent_2') diff --git a/prolog/problems/family_relations/grandparent_2/common.py b/prolog/problems/family_relations/grandparent_2/common.py index e9df06b..fec7734 100644 --- a/prolog/problems/family_relations/grandparent_2/common.py +++ b/prolog/problems/family_relations/grandparent_2/common.py @@ -31,7 +31,16 @@ hint_type = { } test_cases = [ - # TODO + ('grandparent(X, _)', + [{'X': 'aleksandr'}, {'X': 'ana'}, {'X': 'andrew'}, {'X': 'estelle'}, {'X': 'frank'}, + {'X': 'helen'}, {'X': 'jill'}, {'X': 'margaret'}, {'X': 'morty'}, {'X': 'patricia'}, + {'X': 'sally'}, {'X': 'thomas'}, {'X': 'tina'}, {'X': 'william'}]), + ('grandparent(_, X)', + [{'X': 'andrew'}, {'X': 'anna'}, {'X': 'daniela'}, {'X': 'joanne'}, {'X': 'john'}, + {'X': 'kramer'}, {'X': 'luana'}, {'X': 'melanie'}, {'X': 'michael'}, {'X': 'michelle'}, + {'X': 'patricia'}, {'X': 'steve'}, {'X': 'susan'}, {'X': 'vanessa'}]), + ('grandparent(tina, X)', + [{'X': 'vanessa'}, {'X': 'patricia'}]), ] def test(program, solved_problems): -- cgit v1.2.1