From 59739438b954e3977263cd7df7869ac5539ca188 Mon Sep 17 00:00:00 2001
From: Martin
Date: Tue, 15 Sep 2015 16:39:36 +0200
Subject: Added a new Python problem: ballistics
---
python/problems/introduction/pythagorean_theorem/common.py | 4 ++--
python/problems/introduction/pythagorean_theorem/sl.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'python/problems/introduction/pythagorean_theorem')
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:
Imeni a
in b
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 kateta_a
in kateta_b
.
Pri programiranju velja, da izbiramo taka imena spremenljivk,
ki bodo naredila program berljiv.
''',
--
cgit v1.2.1