diff options
author | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-02-29 01:28:27 +0100 |
---|---|---|
committer | Aleksander Sadikov <aleksander.sadikov@fri.uni-lj.si> | 2016-02-29 01:28:27 +0100 |
commit | 4a27f44f48c8d9b0cc7e58215bdd563faea3e748 (patch) | |
tree | 622bc735cc2e208ab81abd57c780a8633d842fb0 /prolog/problems | |
parent | 5d7775da938396b90166958a0908339f6b437b0c (diff) |
Final hint added for sister/2.
Diffstat (limited to 'prolog/problems')
-rw-r--r-- | prolog/problems/family_relations/sister_2/common.py | 4 |
1 files changed, 3 insertions, 1 deletions
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): |