diff options
Diffstat (limited to 'prolog/problems/license_plates/genexp_2')
-rw-r--r-- | prolog/problems/license_plates/genexp_2/en.py | 16 | ||||
-rw-r--r-- | prolog/problems/license_plates/genexp_2/sl.py | 16 |
2 files changed, 16 insertions, 16 deletions
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 = {} |