summaryrefslogtreecommitdiff
path: root/prolog/problems/license_plates
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-01-13 13:51:15 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-01-13 13:51:15 +0100
commit388b32039898cc8f1784378689007254eb7a33b6 (patch)
treeac9e4c6145ad323dc5479179a04f44bbcea73eff /prolog/problems/license_plates
parente36a8a2feca7552d236c0f6e89ac73e7e690e7b1 (diff)
Remove space-padding from <pre> blocks
Diffstat (limited to 'prolog/problems/license_plates')
-rw-r--r--prolog/problems/license_plates/checklicenseplate_3/en.py14
-rw-r--r--prolog/problems/license_plates/checklicenseplate_3/sl.py14
-rw-r--r--prolog/problems/license_plates/firstminus_2/en.py6
-rw-r--r--prolog/problems/license_plates/firstminus_2/sl.py6
-rw-r--r--prolog/problems/license_plates/genexp_2/en.py16
-rw-r--r--prolog/problems/license_plates/genexp_2/sl.py16
-rw-r--r--prolog/problems/license_plates/getdigits_2/en.py4
-rw-r--r--prolog/problems/license_plates/getdigits_2/sl.py4
-rw-r--r--prolog/problems/license_plates/joindigits_2/en.py10
-rw-r--r--prolog/problems/license_plates/joindigits_2/sl.py10
10 files changed, 50 insertions, 50 deletions
diff --git a/prolog/problems/license_plates/checklicenseplate_3/en.py b/prolog/problems/license_plates/checklicenseplate_3/en.py
index 76270cd..927c261 100644
--- a/prolog/problems/license_plates/checklicenseplate_3/en.py
+++ b/prolog/problems/license_plates/checklicenseplate_3/en.py
@@ -6,13 +6,13 @@ slug = 'check if the numbers in a license plate form an equation'
description = '''\
<p><code>checkLicensePlate(LP, E1, E2)</code>: the digits in the list <code>LP</code> can be combined into a valid equation <code>E1</code> = <code>E2</code>. <code>E1</code> and <code>E2</code> are arithmetic expressions, obtained from sublists of <code>Plate</code> by inserting arithmetic operators (<code>+</code>, <code>-</code>, <code>*</code> and <code>/</code>) between elements. An additional unary minus can be inserted before the leftmost number of <code>E1</code> and <code>E2</code>.</p>
<pre>
- ?- checkLicensePlate([l,j,l,3,-,2,1,7], E1, E2).
- E1 = 3, E2 = 21/7 ;
- E1 = -3, E2 = -21/7 ;
- E1 = 3*2, E2 = -1+7 ;
- E1 = -3*2, E2 = 1-7 ;
- E1 = 3*2+1, E2 = 7 ;
- E1 = -3*2-1, E2 = -7.
+?- checkLicensePlate([l,j,l,3,-,2,1,7], E1, E2).
+ E1 = 3, E2 = 21/7 ;
+ E1 = -3, E2 = -21/7 ;
+ E1 = 3*2, E2 = -1+7 ;
+ E1 = -3*2, E2 = 1-7 ;
+ E1 = 3*2+1, E2 = 7 ;
+ E1 = -3*2-1, E2 = -7.
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/checklicenseplate_3/sl.py b/prolog/problems/license_plates/checklicenseplate_3/sl.py
index 2e3ec65..92578d4 100644
--- a/prolog/problems/license_plates/checklicenseplate_3/sl.py
+++ b/prolog/problems/license_plates/checklicenseplate_3/sl.py
@@ -6,13 +6,13 @@ slug = 'Preveri, če lahko iz številk v registrski tablici sestaviš veljavno e
description = '''\
<p><code>checkLicensePlate(LP, E1, E2)</code>: iz cifer v seznamu <code>LP</code> se da sestaviti veljavno enačbo <code>E1</code> = <code>E2</code>. <code>E1</code> in <code>E2</code> sta aritmetična izraza, sestavljena iz podseznamov <code>Plate</code> z uporabo aritmetičnih operatorjev (<code>+</code>, <code>-</code>, <code>*</code> and <code>/</code>). Dodaten unarni minus se lahko vstavi na začetek izrazov <code>E1</code> in <code>E2</code>.</p>
<pre>
- ?- checkLicensePlate([l,j,l,3,-,2,1,7], E1, E2).
- E1 = 3, E2 = 21/7 ;
- E1 = -3, E2 = -21/7 ;
- E1 = 3*2, E2 = -1+7 ;
- E1 = -3*2, E2 = 1-7 ;
- E1 = 3*2+1, E2 = 7 ;
- E1 = -3*2-1, E2 = -7.
+?- checkLicensePlate([l,j,l,3,-,2,1,7], E1, E2).
+ E1 = 3, E2 = 21/7 ;
+ E1 = -3, E2 = -21/7 ;
+ E1 = 3*2, E2 = -1+7 ;
+ E1 = -3*2, E2 = 1-7 ;
+ E1 = 3*2+1, E2 = 7 ;
+ E1 = -3*2-1, E2 = -7.
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/firstminus_2/en.py b/prolog/problems/license_plates/firstminus_2/en.py
index cea521a..f939c91 100644
--- a/prolog/problems/license_plates/firstminus_2/en.py
+++ b/prolog/problems/license_plates/firstminus_2/en.py
@@ -6,9 +6,9 @@ slug = 'negate the first element in a list of numbers'
description = '''\
<p><code>firstMinus(L1, L2)</code>: the list <code>L2</code> is the same as <code>L1</code>, except for the first element that may be negated. Your code should return both solutions.</p>
<pre>
- ?- firstMinus([1,2,3], L).
- L = [1,2,3] ;
- L = [-1,2,3].
+?- firstMinus([1,2,3], L).
+ L = [1,2,3] ;
+ L = [-1,2,3].
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/firstminus_2/sl.py b/prolog/problems/license_plates/firstminus_2/sl.py
index d480994..6186302 100644
--- a/prolog/problems/license_plates/firstminus_2/sl.py
+++ b/prolog/problems/license_plates/firstminus_2/sl.py
@@ -6,9 +6,9 @@ slug = 'Negiraj prvi element v danem seznamu števil'
description = '''\
<p><code>firstMinus(L1, L2)</code>: seznam <code>L2</code> je enak kot <code>L1</code>, razen prvega elementa, ki je lahko negiran ali pa ne. Predikat naj vrne obe rešitvi, eno za drugo.</p>
<pre>
- ?- firstMinus([1,2,3], L).
- L = [1,2,3] ;
- L = [-1,2,3].
+?- firstMinus([1,2,3], L).
+ L = [1,2,3] ;
+ L = [-1,2,3].
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/genexp_2/en.py b/prolog/problems/license_plates/genexp_2/en.py
index 2238f4d..9b25f12 100644
--- a/prolog/problems/license_plates/genexp_2/en.py
+++ b/prolog/problems/license_plates/genexp_2/en.py
@@ -6,14 +6,14 @@ slug = 'generate an arithmetic expression from a list'
description = '''\
<p><code>genexp(L, E)</code>: the expression <code>E</code> is obtained from the list <code>L</code> by inserting arithmetic operators between list elements. Your code should generate all valid solutions.</p>
<pre>
- ?- genexp([1,2,3], L).
- L = 1+2+3 ;
- L = 1+2-3 ;
- L = (1+2)*3 ;
- L = (1+2)/3 ;
- L = 1-2+3 ;
- L = 1-2-3 ;
- ...
+?- genexp([1,2,3], L).
+ L = 1+2+3 ;
+ L = 1+2-3 ;
+ L = (1+2)*3 ;
+ L = (1+2)/3 ;
+ L = 1-2+3 ;
+ L = 1-2-3 ;
+ …
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/genexp_2/sl.py b/prolog/problems/license_plates/genexp_2/sl.py
index 9160f27..b205a7c 100644
--- a/prolog/problems/license_plates/genexp_2/sl.py
+++ b/prolog/problems/license_plates/genexp_2/sl.py
@@ -6,14 +6,14 @@ slug = 'Sestavi aritmetični izraz iz številk v podanem seznamu'
description = '''\
<p><code>genexp(L, E)</code>: Izraz <code>E</code> je zgrajen iz številk v seznamu <code>L</code> z dodajanjem aritmetičnih operatorjev. Predikat naj vrača vse možne izraze, enega po enega.</p>
<pre>
- ?- genexp([1,2,3], L).
- L = 1+2+3 ;
- L = 1+2-3 ;
- L = (1+2)*3 ;
- L = (1+2)/3 ;
- L = 1-2+3 ;
- L = 1-2-3 ;
- ...
+?- genexp([1,2,3], L).
+ L = 1+2+3 ;
+ L = 1+2-3 ;
+ L = (1+2)*3 ;
+ L = (1+2)/3 ;
+ L = 1-2+3 ;
+ L = 1-2-3 ;
+ …
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/getdigits_2/en.py b/prolog/problems/license_plates/getdigits_2/en.py
index afc41d4..cfa66a0 100644
--- a/prolog/problems/license_plates/getdigits_2/en.py
+++ b/prolog/problems/license_plates/getdigits_2/en.py
@@ -6,8 +6,8 @@ slug = 'remove non-numeric elements from a list'
description = '''\
<p><code>getdigits(L, DL)</code>: the list <code>DL</code> contains the numeric elements of <code>L</code>, in the same order as in the original list.</p>
<pre>
- ?- getdigits([2,3,e,-,4,b], DL).
- DL = [2,3,4].
+?- getdigits([2,3,e,-,4,b], DL).
+ DL = [2,3,4].
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/getdigits_2/sl.py b/prolog/problems/license_plates/getdigits_2/sl.py
index 3f59e90..a67f164 100644
--- a/prolog/problems/license_plates/getdigits_2/sl.py
+++ b/prolog/problems/license_plates/getdigits_2/sl.py
@@ -6,8 +6,8 @@ slug = 'Vrni vse številke iz podanega seznama'
description = '''\
<p><code>getdigits(L, DL)</code>: seznam <code>DL</code> vsebuje vse številke iz seznama <code>L</code>, vrstni red elementov se ohrani.</p>
<pre>
- ?- getdigits([2,3,e,-,4,b], DL).
- DL = [2,3,4].
+?- getdigits([2,3,e,-,4,b], DL).
+ DL = [2,3,4].
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/joindigits_2/en.py b/prolog/problems/license_plates/joindigits_2/en.py
index c51f452..9dd7c00 100644
--- a/prolog/problems/license_plates/joindigits_2/en.py
+++ b/prolog/problems/license_plates/joindigits_2/en.py
@@ -6,11 +6,11 @@ slug = 'join adjacent numbers in a list'
description = '''\
<p><code>joindigits(L, NL)</code>: the list <code>NL</code> is obtained from <code>L</code> by arbitrarily joining neighboring digits. Your code should generate all valid solutions.</p>
<pre>
- ?- joindigits([3,2,4], NL).
- NL = [324] ;
- NL = [32,4] ;
- NL = [3,24] ;
- NL = [3,2,4].
+?- joindigits([3,2,4], NL).
+ NL = [324] ;
+ NL = [32,4] ;
+ NL = [3,24] ;
+ NL = [3,2,4].
</pre>'''
hint = {}
diff --git a/prolog/problems/license_plates/joindigits_2/sl.py b/prolog/problems/license_plates/joindigits_2/sl.py
index 344d849..e8c0cb7 100644
--- a/prolog/problems/license_plates/joindigits_2/sl.py
+++ b/prolog/problems/license_plates/joindigits_2/sl.py
@@ -6,11 +6,11 @@ slug = 'Združi sosednja števila v seznamu na vse možne načine'
description = '''\
<p><code>joindigits(L, NL)</code>: seznam <code>NL</code> dobimo iz seznama <code>L</code> tako, da poljubno združujemo sosednja števila. Predikat naj vrača vse možnosti, eno po eno.</p>
<pre>
- ?- joindigits([3,2,4], NL).
- NL = [324] ;
- NL = [32,4] ;
- NL = [3,24] ;
- NL = [3,2,4].
+?- joindigits([3,2,4], NL).
+ NL = [324] ;
+ NL = [32,4] ;
+ NL = [3,24] ;
+ NL = [3,2,4].
</pre>'''
hint = {}