summaryrefslogtreecommitdiff
path: root/python/problems/introduction/fahrenheit_to_celsius/common.py
diff options
context:
space:
mode:
authorJure Žabkar <jure.zabkar@fri.uni-lj.si>2015-10-12 14:19:07 +0200
committerJure Žabkar <jure.zabkar@fri.uni-lj.si>2015-10-12 14:19:07 +0200
commit0a88716110994f789f764704a96791fdfb5fa288 (patch)
tree788c16ab578cf76eda358abc1d0587503d413a87 /python/problems/introduction/fahrenheit_to_celsius/common.py
parent1a7678b37a25a76aeaef7ebb225f85406b19f928 (diff)
parent5a01c2bb184152c6ccc3c536e9b857d247bc55ad (diff)
Merge branch 'master' of ssh://212.235.189.51:22122/codeq-problems
Conflicts: robot/problems/introduction/forward/en.py robot/problems/introduction/forward/sl.py
Diffstat (limited to 'python/problems/introduction/fahrenheit_to_celsius/common.py')
-rw-r--r--python/problems/introduction/fahrenheit_to_celsius/common.py5
1 files changed, 4 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..10a1067 100644
--- a/python/problems/introduction/fahrenheit_to_celsius/common.py
+++ b/python/problems/introduction/fahrenheit_to_celsius/common.py
@@ -3,9 +3,9 @@
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'
number = 1
visible = True
@@ -87,6 +87,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