summaryrefslogtreecommitdiff
path: root/python/problems/introduction/pythagorean_theorem
diff options
context:
space:
mode:
authorMartin <martin@leo.fri1.uni-lj.si>2015-09-15 16:39:36 +0200
committerMartin <martin@leo.fri1.uni-lj.si>2015-09-15 16:39:36 +0200
commit59739438b954e3977263cd7df7869ac5539ca188 (patch)
treea966e105a8e000764133895b3e55c75a256742cf /python/problems/introduction/pythagorean_theorem
parentdf2e7033ff1a4336d7cc404a845e3c214ee7ddfd (diff)
Added a new Python problem: ballistics
Diffstat (limited to 'python/problems/introduction/pythagorean_theorem')
-rw-r--r--python/problems/introduction/pythagorean_theorem/common.py4
-rw-r--r--python/problems/introduction/pythagorean_theorem/sl.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/python/problems/introduction/pythagorean_theorem/common.py b/python/problems/introduction/pythagorean_theorem/common.py
index 800107e..7a232c1 100644
--- a/python/problems/introduction/pythagorean_theorem/common.py
+++ b/python/problems/introduction/pythagorean_theorem/common.py
@@ -65,9 +65,9 @@ def hint(python, code):
# if have an exception!
if exc:
if 'NameError' in exc:
- return [{'id':'name_error', 'args': {'exception': exc}}]
+ return [{'id':'name_error', 'args': {'message': exc}}]
if 'unsupported operand' in exc or 'TypeError' in exc:
- return [{'id':'unsupported_operand', 'args': {'exception': exc}}]
+ return [{'id':'unsupported_operand', 'args': {'message': exc}}]
# show plan if student is lost
if len(code.strip()) < 5 or (not has_token_sequence(code, ['input']) and
diff --git a/python/problems/introduction/pythagorean_theorem/sl.py b/python/problems/introduction/pythagorean_theorem/sl.py
index 806db27..d9f0281 100644
--- a/python/problems/introduction/pythagorean_theorem/sl.py
+++ b/python/problems/introduction/pythagorean_theorem/sl.py
@@ -59,7 +59,7 @@ dve vrednosti in jih shranimo v dve spremenljivki:</p>
<p> Imeni <code>a</code> in <code>b</code> sta spremenljivki (angl. variable).
Spremenljivke uporabljamo, kadar želimo kakšno vrednost shraniti, ki jo bomo
potrebovali kasneje v programu. Imena spremenljivk so lahko poljubno
- dolga, v našem primeru bi jim lahko rekli tudi kateta_a in kateta_b.
+ dolga, v našem primeru bi jim lahko rekli tudi <code>kateta_a</code> in <code>kateta_b</code>.
Pri programiranju velja, da izbiramo taka imena spremenljivk,
ki bodo naredila program berljiv. </p>
''',