summaryrefslogtreecommitdiff
path: root/python/problems/while_and_if/consumers_anonymous
diff options
context:
space:
mode:
Diffstat (limited to 'python/problems/while_and_if/consumers_anonymous')
-rw-r--r--python/problems/while_and_if/consumers_anonymous/common.py3
-rw-r--r--python/problems/while_and_if/consumers_anonymous/en.py4
-rw-r--r--python/problems/while_and_if/consumers_anonymous/sl.py11
3 files changed, 8 insertions, 10 deletions
diff --git a/python/problems/while_and_if/consumers_anonymous/common.py b/python/problems/while_and_if/consumers_anonymous/common.py
index 07a0ebf..895d985 100644
--- a/python/problems/while_and_if/consumers_anonymous/common.py
+++ b/python/problems/while_and_if/consumers_anonymous/common.py
@@ -5,7 +5,6 @@ from python.util import has_token_sequence, string_almost_equal, \
from server.hints import Hint
id = 201
-group = 'while_and_if'
number = 6
visible = True
@@ -111,7 +110,7 @@ def hint(python, code):
return [{'id' : 'printing'}]
# student does not print any values
- if not get_numbers(answer[0][1]):
+ if len(get_numbers(answer[0][1])) < 2:
return [{'id' : 'nonumber'}]
# student's answer is not correct (three possibilities)
diff --git a/python/problems/while_and_if/consumers_anonymous/en.py b/python/problems/while_and_if/consumers_anonymous/en.py
index 6331570..9691ac2 100644
--- a/python/problems/while_and_if/consumers_anonymous/en.py
+++ b/python/problems/while_and_if/consumers_anonymous/en.py
@@ -3,8 +3,8 @@ import server
mod = server.problems.load_language('python', 'sl')
id = 201
-name = 'Consumers Anonymous'
-slug = 'Consumers Anonymous'
+name = 'Consumers anonymous'
+slug = 'Consumers anonymous'
description = '''\
<p>(translation missing)</p>'''
diff --git a/python/problems/while_and_if/consumers_anonymous/sl.py b/python/problems/while_and_if/consumers_anonymous/sl.py
index 284abbc..131a13b 100644
--- a/python/problems/while_and_if/consumers_anonymous/sl.py
+++ b/python/problems/while_and_if/consumers_anonymous/sl.py
@@ -2,7 +2,6 @@
import server
mod = server.problems.load_language('python', 'sl')
-id = 201
name = 'Klub anonimnih potrošnikov'
slug = 'Klub anonimnih potrošnikov'
@@ -46,17 +45,17 @@ Porabili boste 10 evrov za 10 stvari.
'''
main_plan = ['''\
-<p><b>Plan</b> je enak kot pri prejšnjih nalogah: while zanka + izpis števca in vsote. </p>
+<p>Plan je enak kot pri prejšnjih nalogah: while zanka + izpis števca in vsote. </p>
''']
while_condition = ['''\
-<p><b>Pogoj</b> v zanki while bo sestavljen iz več pogojev.</p>''',
+<p>Pogoj v zanki <code>while</code> bo sestavljen iz več pogojev.</p>''',
'''\
<p>V Pythonu združujemo pogoje z logičnimi operatoriji <code>and</code>,
<code>or</code> in <code>not</code></p>'''
'''\
<p>Zanka se ustavi, če presežemo 100 EUR, če smo vpisali 0 ali kupili 10 stvari.
-Vendar pazite: napisati moramo pogoj, kdaj se zanka <b>nadaljuje</b>!</p>''',
+Vendar pazite: napisati moramo pogoj, kdaj se zanka nadaljuje!</p>''',
'''\
<pre>
cena != 0 and vsota < 100 and artiklov < 10
@@ -110,10 +109,10 @@ hint = {
Pravilna vsota [%=sum%], pravilno število stvari: [%=count%]'''],
'final_hint': ['''\
-<p><b>Odlično!</b> Naloga rešena.</p>
+<p>Odlično! Naloga rešena.<br>
Še zanimivost: v while zanki smo dobili ustavitveni pogoj tako, da smo negirali pogoj iz teksta (ali vnesemo 0 ali je
vnešenih deset števil ali ko vsota cen doseže ali preseže 100 evrov). Pri tem smo ali (or) spremenili v in (and):
-<code>cena > 0 and stevec < 10 and vsota < 100</code>. Temu pravimo De Morganov zakon.
+<code>cena > 0 and stevec < 10 and vsota < 100</code>. Temu pravimo De Morganov zakon.</p>
'''],
'eof_error':[mod.general_msg['eof_error'],