summaryrefslogtreecommitdiff
path: root/python/problems/introduction
diff options
context:
space:
mode:
Diffstat (limited to 'python/problems/introduction')
-rw-r--r--python/problems/introduction/fahrenheit_to_celsius/common.py4
-rw-r--r--python/problems/introduction/fahrenheit_to_celsius/sl.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/python/problems/introduction/fahrenheit_to_celsius/common.py b/python/problems/introduction/fahrenheit_to_celsius/common.py
index 6549c32..918c643 100644
--- a/python/problems/introduction/fahrenheit_to_celsius/common.py
+++ b/python/problems/introduction/fahrenheit_to_celsius/common.py
@@ -3,6 +3,7 @@
from python.util import has_token_sequence, string_almost_equal, \
string_contains_number, get_tokens, get_numbers, get_exception_desc
from server.hints import Hint
+import re
id = 180
group = 'introduction'
@@ -87,6 +88,9 @@ def hint(python, code):
if not has_token_sequence(tokens, ['input']):
return [{'id': 'no_input_call'}]
+ if not re.findall(r'=[^\n]*?input', code):
+ return [{'id': 'no_input_call'}]
+
# if tokens * or / or = are not in code, we have to teach them how to
# evaluate expressions.
if (not has_token_sequence(tokens, ['/']) or
diff --git a/python/problems/introduction/fahrenheit_to_celsius/sl.py b/python/problems/introduction/fahrenheit_to_celsius/sl.py
index b61c436..ae3db5f 100644
--- a/python/problems/introduction/fahrenheit_to_celsius/sl.py
+++ b/python/problems/introduction/fahrenheit_to_celsius/sl.py
@@ -12,7 +12,7 @@ stopinjah, program pa jo izpiše v Celzijevih. Med temperaturama pretvarjamo po
formuli C = 5/9 (F – 32).</p>'''
no_input_call = ['''\
-<p>Uporabnika nekaj vprašamo s funkcijo <code>input</code>.</p>''',
+<p>Uporabi funkcijo <code>input</code> in shrani rezultat.</p>''',
'''\
<p>Funkcija <code>input</code> sprejme niz (<em>angl.</em> string), ki se
prikaže uporabniku kot vprašanje in vrača, kar je uporabnik napisal. </p>''',