From 4a27f44f48c8d9b0cc7e58215bdd563faea3e748 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Mon, 29 Feb 2016 01:28:27 +0100 Subject: Final hint added for sister/2. --- prolog/problems/family_relations/sister_2/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'prolog/problems/family_relations') diff --git a/prolog/problems/family_relations/sister_2/common.py b/prolog/problems/family_relations/sister_2/common.py index 456ee97..6b1f4e9 100644 --- a/prolog/problems/family_relations/sister_2/common.py +++ b/prolog/problems/family_relations/sister_2/common.py @@ -58,7 +58,9 @@ def test(code, aux_code): if engine_id: prolog.engine.destroy(engine_id) - hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}, {'id': 'final_hint'}] + hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_cases)}}] + if n_correct == len(test_cases): + hints += [{'id': 'final_hint'}] return n_correct, len(test_cases), hints def hint(code, aux_code): -- cgit v1.2.1