summaryrefslogtreecommitdiff
path: root/python/problems/introduction/fast_fingers_2
diff options
context:
space:
mode:
authorMartin <martin@leo.fri1.uni-lj.si>2015-09-29 10:30:10 +0200
committerMartin <martin@leo.fri1.uni-lj.si>2015-09-29 10:30:10 +0200
commit1db5b636325141db84e03f0a72a6e8cc7bcb2ee2 (patch)
tree186471c5a998c7e483fa3eb1915d86d6aa15fcac /python/problems/introduction/fast_fingers_2
parentd06dade8c75dfa5aceacaf1a1b47f61c5fef31c4 (diff)
Small corrections to text; mostly changing plural form to singular.
Diffstat (limited to 'python/problems/introduction/fast_fingers_2')
-rw-r--r--python/problems/introduction/fast_fingers_2/common.py11
-rw-r--r--python/problems/introduction/fast_fingers_2/sl.py18
2 files changed, 3 insertions, 26 deletions
diff --git a/python/problems/introduction/fast_fingers_2/common.py b/python/problems/introduction/fast_fingers_2/common.py
index 958940d..386e251 100644
--- a/python/problems/introduction/fast_fingers_2/common.py
+++ b/python/problems/introduction/fast_fingers_2/common.py
@@ -31,9 +31,6 @@ random.randint = lambda x, y: {}
hint_type = {
'random': Hint('random'),
- 'name_error': Hint('name_error'),
- 'type_error': Hint('type_error'),
- 'error': Hint('error'),
'if_clause': Hint('if_clause'),
'final_hint': Hint('final_hint')
}
@@ -91,13 +88,7 @@ def hint(python, code):
exc = answer[0][3]
exc_hint = get_exception_desc(answer[0][3])
# if have an exception!
- if exc:
- if 'NameError' in exc:
- return [{'id':'name_error', 'args': {'message': exc}}]
- elif 'TypeError' in exc:
- return [{'id':'type_error', 'args': {'message': exc}}]
- else:
- return exc_hint
+ return exc_hint
# First: if student does not import random, tell him about that module
if not has_token_sequence(tokens, ['random']) or \
diff --git a/python/problems/introduction/fast_fingers_2/sl.py b/python/problems/introduction/fast_fingers_2/sl.py
index 8e7dd47..6472442 100644
--- a/python/problems/introduction/fast_fingers_2/sl.py
+++ b/python/problems/introduction/fast_fingers_2/sl.py
@@ -65,26 +65,12 @@ hint = {
'if_clause': if_clause,
- 'final_hint': '''\
+ 'final_hint': ['''\
<p><b>Odlično!</b> Za konec pa še zanimivost.
Pri tej nalogi stavka <code>if</code> niti ne potrebujemo, saj bi lahko napisali le:</p>
<pre>
print(a*b == c)
</pre>
-<p>kar bi izpisalo rezultat tega izraza. Poskusi!</p>''',
+<p>kar bi izpisalo rezultat tega izraza. Poskusi!</p>''']
- 'name_error' : [mod.general_msg['error_head'], mod.general_msg['general_exception'],
- mod.general_msg['name_error'], '''
-<p>Verjetno uporabljate spremenljivko, ki nima vrednosti. Ali v izrazu za izračun
- uporabljate napačno spremenljivko? Ali pri izpisu morda poskušate
- izpisati napačno spremenljivko?</p>'''],
-
- 'type_error' : [mod.general_msg['error_head'], mod.general_msg['general_exception'],
- mod.general_msg['type_error'], '''
-<p>Verjetni razlog: funkcija <code>input</code> vrača vrednost tipa niz,
-ki jo moramo najprej pretvoriti v tip <code>float</code>, če želimo z njo računati:</p>
-<pre>
-v = float(input(" ...
-</pre>
-'''],
}