summaryrefslogtreecommitdiff
path: root/prolog/problems/clp_fd
diff options
context:
space:
mode:
authorAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2015-12-15 10:45:30 +0100
committerAleksander Sadikov <aleksander.sadikov@fri.uni-lj.si>2015-12-15 10:46:19 +0100
commit2a4a1d39bfcfb8b258be96c180dde09a12345295 (patch)
treedac9e6080fac3adf0fe0b5d93a65ea0259a5b2e6 /prolog/problems/clp_fd
parentf22468b134a88fcd7acb1415c9997f578f1abe7b (diff)
Add Slovenian translations for Prolog.{clp_fd,dcg}
Diffstat (limited to 'prolog/problems/clp_fd')
-rw-r--r--prolog/problems/clp_fd/gcd_3/sl.py14
-rw-r--r--prolog/problems/clp_fd/magic_1/sl.py14
-rw-r--r--prolog/problems/clp_fd/puzzle_abc_3/sl.py10
-rw-r--r--prolog/problems/clp_fd/puzzle_beth_1/sl.py11
-rw-r--r--prolog/problems/clp_fd/puzzle_momson_2/sl.py10
-rw-r--r--prolog/problems/clp_fd/puzzle_ratio_2/sl.py10
-rw-r--r--prolog/problems/clp_fd/tobase_3/sl.py17
7 files changed, 86 insertions, 0 deletions
diff --git a/prolog/problems/clp_fd/gcd_3/sl.py b/prolog/problems/clp_fd/gcd_3/sl.py
new file mode 100644
index 0000000..9ef1a87
--- /dev/null
+++ b/prolog/problems/clp_fd/gcd_3/sl.py
@@ -0,0 +1,14 @@
+# coding=utf-8
+
+name = 'gcd/3'
+slug = 'Največji skupni delitelj'
+
+description = '''\
+<p><code>gcd(X, Y, GCD)</code>: <code>GCD</code> je največji skupni delitelj števil <code>X</code> in <code>Y</code>. Implementiraj ta predikat z uporabo omejitev.</p>
+<p>Namig: poskusi najprej napisati predikat, ki poišče <em>vse</em> skupne delitelje dveh števil.</p>
+<pre>
+ ?- gcd(36, 84, GCD).
+ GCD = 12.
+</pre>'''
+
+hint = {}
diff --git a/prolog/problems/clp_fd/magic_1/sl.py b/prolog/problems/clp_fd/magic_1/sl.py
new file mode 100644
index 0000000..8cf040e
--- /dev/null
+++ b/prolog/problems/clp_fd/magic_1/sl.py
@@ -0,0 +1,14 @@
+# coding=utf-8
+
+name = 'magic/1'
+slug = '3x3 magični kvadrat'
+
+description = '''\
+<p><code>magic(S)</code>: seznam <code>S</code> predstavlja 3×3 magični kvadrat (<code>S</code> je permutacija števil 1 do 9 -- tri števila tvorijo eno vrstico). Vsote števil v vsaki vrstici, stolpcu in glavni diagonali magičnega kvadrata so enake. Implementiraj ta predikat z uporabo omejitev. Predikat naj vrne vse rešitve, eno po eno.</p>
+<pre>
+ ?- magic(S).
+ S = [2, 7, 6, 9, 5, 1, 4, 3, 8] ;
+ …
+</pre>'''
+
+hint = {}
diff --git a/prolog/problems/clp_fd/puzzle_abc_3/sl.py b/prolog/problems/clp_fd/puzzle_abc_3/sl.py
new file mode 100644
index 0000000..118481a
--- /dev/null
+++ b/prolog/problems/clp_fd/puzzle_abc_3/sl.py
@@ -0,0 +1,10 @@
+# coding=utf-8
+
+name = 'puzzle_abc/3'
+slug = 'Uganka z leti: ABC'
+
+description = '''\
+<p>Oseba <code>A</code> je dve leti starejša od osebe <code>B</code>, ki je dvakrat starejša od osebe <code>C</code>. Skupaj so osebe A, B in C stare 27 let.</p>
+<p>Napiši predikat <code>puzzle_abc(A, B, C)</code>, ki izračuna koliko so stare osebe A, B in C.</p>'''
+
+hint = {}
diff --git a/prolog/problems/clp_fd/puzzle_beth_1/sl.py b/prolog/problems/clp_fd/puzzle_beth_1/sl.py
new file mode 100644
index 0000000..261ec74
--- /dev/null
+++ b/prolog/problems/clp_fd/puzzle_beth_1/sl.py
@@ -0,0 +1,11 @@
+# coding=utf-8
+
+name = 'puzzle_beth/1'
+slug = 'Uganka z leti: Beti'
+
+description = '''\
+<p>Ko so Beti vprašali koliko je stara, je odgovorila takole "Čez dve leti bom dvakrat starejša kot sem bila pet let nazaj".</p>
+<p>Napiši predikat <code>puzzle_beth(X)</code>, ki izračuna njeno trenutno starost <code>X</code>.</p>
+'''
+
+hint = {}
diff --git a/prolog/problems/clp_fd/puzzle_momson_2/sl.py b/prolog/problems/clp_fd/puzzle_momson_2/sl.py
new file mode 100644
index 0000000..593f153
--- /dev/null
+++ b/prolog/problems/clp_fd/puzzle_momson_2/sl.py
@@ -0,0 +1,10 @@
+# coding=utf-8
+
+name = 'puzzle_momson/2'
+slug = 'Uganka z leti: mama in sin'
+
+description = '''\
+<p>Mama in sin sta skupaj stara 66 let. Mamina leta so ravno sinova obrnjena leta (obrnjene so cifre). Koliko sta stara?</p>
+<p>Napiši predikat <code>puzzle_momson(M, S)</code>, ki izračuna starost mame <code>M</code> in sina <code>S</code>.</p>'''
+
+hint = {}
diff --git a/prolog/problems/clp_fd/puzzle_ratio_2/sl.py b/prolog/problems/clp_fd/puzzle_ratio_2/sl.py
new file mode 100644
index 0000000..826e66f
--- /dev/null
+++ b/prolog/problems/clp_fd/puzzle_ratio_2/sl.py
@@ -0,0 +1,10 @@
+# coding=utf-8
+
+name = 'puzzle_ratio/2'
+slug = 'Uganka z leti: razmerje'
+
+description = '''\
+<p>Trenutni starosti osebe <code>A</code> in osebe <code>B</code> sta v razmerju 5:4. Čez tri leta bo razmerje njunih let postalo 11:9.</p>
+<p>Napiši predikat <code>puzzle_ratio(A, B)</code>, ki izračuna starost osebe <code>A</code> in osebe <code>B</code>.</p>'''
+
+hint = {}
diff --git a/prolog/problems/clp_fd/tobase_3/sl.py b/prolog/problems/clp_fd/tobase_3/sl.py
new file mode 100644
index 0000000..a775808
--- /dev/null
+++ b/prolog/problems/clp_fd/tobase_3/sl.py
@@ -0,0 +1,17 @@
+# coding=utf-8
+
+name = 'tobase/3'
+slug = 'Pretvori števila v/iz desetiškega sistema'
+
+description = '''\
+<p><code>tobase(Number, B, X)</code>: število <code>Number</code> je v desetiškem sistemu. <code>X</code> predstavlja to število v sistemu z bazo <code>B</code>. Implementiraj predikat z uporabo omejitev. Omeji vrednost <code>B</code> na interval [2..10].</p>
+<pre>
+ ?- tobase(42, 2, X).
+ X = 101010.
+ ?- tobase(N, 2, 101010).
+ N = 42.
+ ?- tobase(42, B, 101010).
+ B = 2.
+</pre>'''
+
+hint = {}