From 2a4a1d39bfcfb8b258be96c180dde09a12345295 Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Tue, 15 Dec 2015 10:45:30 +0100 Subject: Add Slovenian translations for Prolog.{clp_fd,dcg} --- prolog/problems/clp_fd/gcd_3/sl.py | 14 ++++++++++++++ prolog/problems/clp_fd/magic_1/sl.py | 14 ++++++++++++++ prolog/problems/clp_fd/puzzle_abc_3/sl.py | 10 ++++++++++ prolog/problems/clp_fd/puzzle_beth_1/sl.py | 11 +++++++++++ prolog/problems/clp_fd/puzzle_momson_2/sl.py | 10 ++++++++++ prolog/problems/clp_fd/puzzle_ratio_2/sl.py | 10 ++++++++++ prolog/problems/clp_fd/tobase_3/sl.py | 17 +++++++++++++++++ 7 files changed, 86 insertions(+) create mode 100644 prolog/problems/clp_fd/gcd_3/sl.py create mode 100644 prolog/problems/clp_fd/magic_1/sl.py create mode 100644 prolog/problems/clp_fd/puzzle_abc_3/sl.py create mode 100644 prolog/problems/clp_fd/puzzle_beth_1/sl.py create mode 100644 prolog/problems/clp_fd/puzzle_momson_2/sl.py create mode 100644 prolog/problems/clp_fd/puzzle_ratio_2/sl.py create mode 100644 prolog/problems/clp_fd/tobase_3/sl.py (limited to 'prolog/problems/clp_fd') 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 = '''\ +

gcd(X, Y, GCD): GCD je največji skupni delitelj števil X in Y. Implementiraj ta predikat z uporabo omejitev.

+

Namig: poskusi najprej napisati predikat, ki poišče vse skupne delitelje dveh števil.

+
+  ?- gcd(36, 84, GCD).
+    GCD = 12.
+
''' + +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 = '''\ +

magic(S): seznam S predstavlja 3×3 magični kvadrat (S 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.

+
+  ?- magic(S).
+    S = [2, 7, 6, 9, 5, 1, 4, 3, 8] ;
+    …
+
''' + +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 = '''\ +

Oseba A je dve leti starejša od osebe B, ki je dvakrat starejša od osebe C. Skupaj so osebe A, B in C stare 27 let.

+

Napiši predikat puzzle_abc(A, B, C), ki izračuna koliko so stare osebe A, B in C.

''' + +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 = '''\ +

Ko so Beti vprašali koliko je stara, je odgovorila takole "Čez dve leti bom dvakrat starejša kot sem bila pet let nazaj".

+

Napiši predikat puzzle_beth(X), ki izračuna njeno trenutno starost X.

+''' + +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 = '''\ +

Mama in sin sta skupaj stara 66 let. Mamina leta so ravno sinova obrnjena leta (obrnjene so cifre). Koliko sta stara?

+

Napiši predikat puzzle_momson(M, S), ki izračuna starost mame M in sina S.

''' + +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 = '''\ +

Trenutni starosti osebe A in osebe B sta v razmerju 5:4. Čez tri leta bo razmerje njunih let postalo 11:9.

+

Napiši predikat puzzle_ratio(A, B), ki izračuna starost osebe A in osebe B.

''' + +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 = '''\ +

tobase(Number, B, X): število Number je v desetiškem sistemu. X predstavlja to število v sistemu z bazo B. Implementiraj predikat z uporabo omejitev. Omeji vrednost B na interval [2..10].

+
+  ?- tobase(42, 2, X).
+    X = 101010.
+  ?- tobase(N, 2, 101010).
+    N = 42.
+  ?- tobase(42, B, 101010).
+    B = 2.
+
''' + +hint = {} -- cgit v1.2.1