diff options
author | Jure Žabkar <jure.zabkar@fri.uni-lj.si> | 2015-10-12 14:19:07 +0200 |
---|---|---|
committer | Jure Žabkar <jure.zabkar@fri.uni-lj.si> | 2015-10-12 14:19:07 +0200 |
commit | 0a88716110994f789f764704a96791fdfb5fa288 (patch) | |
tree | 788c16ab578cf76eda358abc1d0587503d413a87 /python/problems/introduction/fahrenheit_to_celsius | |
parent | 1a7678b37a25a76aeaef7ebb225f85406b19f928 (diff) | |
parent | 5a01c2bb184152c6ccc3c536e9b857d247bc55ad (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')
3 files changed, 5 insertions, 4 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 diff --git a/python/problems/introduction/fahrenheit_to_celsius/en.py b/python/problems/introduction/fahrenheit_to_celsius/en.py index a2af212..5d7522e 100644 --- a/python/problems/introduction/fahrenheit_to_celsius/en.py +++ b/python/problems/introduction/fahrenheit_to_celsius/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 180 name = 'Converting Fahrenheit to Celsius' slug = 'Converting Fahrenheit to Celsius' diff --git a/python/problems/introduction/fahrenheit_to_celsius/sl.py b/python/problems/introduction/fahrenheit_to_celsius/sl.py index b61c436..f5ce4a4 100644 --- a/python/problems/introduction/fahrenheit_to_celsius/sl.py +++ b/python/problems/introduction/fahrenheit_to_celsius/sl.py @@ -2,7 +2,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 180 name = 'Pretvarjanje iz Fahrenheitov v Celzije' slug = 'Pretvarjanje iz Fahrenheitov v Celzije' @@ -12,7 +11,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>''', |