summaryrefslogtreecommitdiff
path: root/python/problems/while_and_if/top_shop
diff options
context:
space:
mode:
Diffstat (limited to 'python/problems/while_and_if/top_shop')
-rw-r--r--python/problems/while_and_if/top_shop/common.py2
-rw-r--r--python/problems/while_and_if/top_shop/sl.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/python/problems/while_and_if/top_shop/common.py b/python/problems/while_and_if/top_shop/common.py
index 115dc9e..887d43e 100644
--- a/python/problems/while_and_if/top_shop/common.py
+++ b/python/problems/while_and_if/top_shop/common.py
@@ -55,7 +55,7 @@ def test(python, code):
n_correct = 0
tin = None
for i, (output, correct) in enumerate(zip(outputs, test_out)):
- if all(string_almost_equal(output, correct[i]) for i in range(2)):
+ if all(string_almost_equal(output, correct[i], prec=2) for i in range(2)):
n_correct += 1
else:
tin = test_in[i][1]
diff --git a/python/problems/while_and_if/top_shop/sl.py b/python/problems/while_and_if/top_shop/sl.py
index ee9d02d..b577633 100644
--- a/python/problems/while_and_if/top_shop/sl.py
+++ b/python/problems/while_and_if/top_shop/sl.py
@@ -24,7 +24,7 @@ Poprečna cena: 2.33333333333
'''
main_plan = ['''\
-<p><b>Plan:</b></p>
+<p>Plan:</p>
<pre>
1. Ponavljaj dokler je cena večja od 0:
2. Preberi ceno.
@@ -94,7 +94,8 @@ while cena != 0:
...'''],
'final_hint': ['''\
-<p><b>Odlično!</b> Kaj bi pa moral narediti, da bi število -1 pomenilo konec?</p>''',
+<p>Odlično, program je pravilen! <br>
+Kaj bi pa moral narediti, da bi število -1 pomenilo konec?</p>''',
'''\
<p>Spremeniti pogoj in paziti,
da se vrednost -1 ne prišteje vsoti!</p>'''],