From 72a899429bd5c219c718665c037a5e46ad143ed2 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Mon, 6 Mar 2017 19:55:07 +0100 Subject: World Data exercises updated. --- prolog/problems/world_data/people_in_capitals_1/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'prolog/problems/world_data/people_in_capitals_1') diff --git a/prolog/problems/world_data/people_in_capitals_1/common.py b/prolog/problems/world_data/people_in_capitals_1/common.py index b38a96f..cda2e06 100644 --- a/prolog/problems/world_data/people_in_capitals_1/common.py +++ b/prolog/problems/world_data/people_in_capitals_1/common.py @@ -13,17 +13,17 @@ facts = 'mondial' solution = '''\ people_in_capitals(N) :- findall(Pop, - (country(_,_,Capital,_,_,_), - city(Capital,_,_,Pop,_,_,_), + (country(_,ID,Capital,_,_,_), + city(Capital,ID,_,Pop,_,_,_), number(Pop)), L), - sum(L, N). + sum_list(L, N). ''' hint_type = { } test_cases = [ - ('people_in_capitals(N)', [{'N': '316277426'}]), + ('people_in_capitals(N)', [{'N': '313163317'}]), # old solution without equal IDs [{'N': '316277426'}] ] def test(code, aux_code): -- cgit v1.2.1