summaryrefslogtreecommitdiff
path: root/prolog/problems/license_plates/checklicenseplate_3
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/license_plates/checklicenseplate_3')
-rw-r--r--prolog/problems/license_plates/checklicenseplate_3/en.py14
-rw-r--r--prolog/problems/license_plates/checklicenseplate_3/sl.py14
2 files changed, 14 insertions, 14 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 = {}