From d0dd9cd28eec6007c2f80737a47895498b0ee9f7 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 18 Oct 2016 16:26:00 +0200 Subject: Prolog: add more world_data exercises --- prolog/problems/world_data/flows_2/en.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 prolog/problems/world_data/flows_2/en.py (limited to 'prolog/problems/world_data/flows_2/en.py') diff --git a/prolog/problems/world_data/flows_2/en.py b/prolog/problems/world_data/flows_2/en.py new file mode 100644 index 0000000..f108001 --- /dev/null +++ b/prolog/problems/world_data/flows_2/en.py @@ -0,0 +1,20 @@ +name = 'flows/2' +slug = '' + +description = '''\ +

flows(X, Y): the river X flows to sea Y. +The predicate should follow the flow from X through different rivers +until it reaches a sea - for example, Drina flows into Save, which flows into Donau, +ending in the Black Sea:

+
+?- flows('Drina', Y).
+  Y = 'Black Sea'.
+
+

River data is given by the predicate

+
+river(Name, FlowsToRiver, FlowsToLake, FlowsToSea, Length, Area,
+      SourceLat, SourceLon, SourceElevation, MouthLat, MouthLon).
+
+''' + +hint = {} -- cgit v1.2.1