From bab0b0a2fe8b3aad853740750d4873fb929f5f41 Mon Sep 17 00:00:00 2001
From: Martin Plan je enak kot pri prejšnjih nalogah: while zanka + izpis števca in vsote. Plan je enak kot pri prejšnjih nalogah: while zanka + izpis števca in vsote. Pogoj v zanki while bo sestavljen iz več pogojev. Pogoj v zanki V Pythonu združujemo pogoje z logičnimi operatoriji Zanka se ustavi, če presežemo 100 EUR, če smo vpisali 0 ali kupili 10 stvari.
-Vendar pazite: napisati moramo pogoj, kdaj se zanka nadaljuje!while
bo sestavljen iz več pogojev.and
,
or
in not
cena != 0 and vsota < 100 and artiklov < 10 @@ -110,10 +110,10 @@ hint = { Pravilna vsota [%=sum%], pravilno število stvari: [%=count%]'''], 'final_hint': ['''\ -Odlično! Naloga rešena.
+Odlično! Naloga rešena.
'''], 'eof_error':[mod.general_msg['eof_error'], -- cgit v1.2.1 From ce3b6703c153ba5c827996bfa8fd9bfa85fe2adb Mon Sep 17 00:00:00 2001 From: Timotej Lazar
Š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): -cena > 0 and stevec < 10 and vsota < 100
. Temu pravimo De Morganov zakon. +cena > 0 and stevec < 10 and vsota < 100
. Temu pravimo De Morganov zakon.Date: Thu, 8 Oct 2015 16:02:17 +0200 Subject: Remove unneeded id field from {en,sl}.py files --- python/problems/while_and_if/consumers_anonymous/en.py | 1 - python/problems/while_and_if/consumers_anonymous/sl.py | 1 - 2 files changed, 2 deletions(-) (limited to 'python/problems/while_and_if/consumers_anonymous') diff --git a/python/problems/while_and_if/consumers_anonymous/en.py b/python/problems/while_and_if/consumers_anonymous/en.py index 6331570..49fe465 100644 --- a/python/problems/while_and_if/consumers_anonymous/en.py +++ b/python/problems/while_and_if/consumers_anonymous/en.py @@ -2,7 +2,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 201 name = 'Consumers Anonymous' slug = 'Consumers Anonymous' diff --git a/python/problems/while_and_if/consumers_anonymous/sl.py b/python/problems/while_and_if/consumers_anonymous/sl.py index cc5bcb7..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' -- cgit v1.2.1 From 84f3426c937d1bb9d44ba25a71706416fbb8b85d Mon Sep 17 00:00:00 2001 From: Martin Date: Fri, 9 Oct 2015 11:17:49 +0200 Subject: Added several new problems. They have no tests nor hints implemented. --- python/problems/while_and_if/consumers_anonymous/en.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/problems/while_and_if/consumers_anonymous') 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 = '''\ (translation missing)
''' -- cgit v1.2.1 From 6e281624b9a0ae29f1f1862f9d581b219ba3b95a Mon Sep 17 00:00:00 2001 From: Timotej LazarDate: Mon, 12 Oct 2015 11:46:08 +0200 Subject: Remove group attribute from problem common.py files --- python/problems/while_and_if/consumers_anonymous/common.py | 1 - 1 file changed, 1 deletion(-) (limited to 'python/problems/while_and_if/consumers_anonymous') diff --git a/python/problems/while_and_if/consumers_anonymous/common.py b/python/problems/while_and_if/consumers_anonymous/common.py index b955f49..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 -- cgit v1.2.1