summaryrefslogtreecommitdiff
path: root/prolog/problems/world_data/people_in_capitals_1
diff options
context:
space:
mode:
authorAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2017-03-06 19:55:07 +0100
committerAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2017-03-06 19:55:07 +0100
commit72a899429bd5c219c718665c037a5e46ad143ed2 (patch)
treeea00875178ab8913c791246c31542f1b8cf6bd68 /prolog/problems/world_data/people_in_capitals_1
parent789ac4a72a7400d4463cd479bd222516009c3538 (diff)
World Data exercises updated.
Diffstat (limited to 'prolog/problems/world_data/people_in_capitals_1')
-rw-r--r--prolog/problems/world_data/people_in_capitals_1/common.py8
1 files changed, 4 insertions, 4 deletions
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):