From 1f9f6de923e4b490c42a44d660b3e32dbe11426e Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 8 Oct 2015 11:17:16 +0200 Subject: Added final hint to contains_42. --- python/problems/introduction/fahrenheit_to_celsius/common.py | 4 ++++ python/problems/introduction/fahrenheit_to_celsius/sl.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'python/problems/introduction/fahrenheit_to_celsius') 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).

''' no_input_call = ['''\ -

Uporabnika nekaj vprašamo s funkcijo input.

''', +

Uporabi funkcijo input in shrani rezultat.

''', '''\

Funkcija input sprejme niz (angl. string), ki se prikaže uporabniku kot vprašanje in vrača, kar je uporabnik napisal.

''', -- cgit v1.2.1 From ce3b6703c153ba5c827996bfa8fd9bfa85fe2adb Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 8 Oct 2015 16:02:17 +0200 Subject: Remove unneeded id field from {en,sl}.py files --- python/problems/introduction/fahrenheit_to_celsius/en.py | 1 - python/problems/introduction/fahrenheit_to_celsius/sl.py | 1 - 2 files changed, 2 deletions(-) (limited to 'python/problems/introduction/fahrenheit_to_celsius') 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 ae3db5f..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' -- cgit v1.2.1 From 6e281624b9a0ae29f1f1862f9d581b219ba3b95a Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 12 Oct 2015 11:46:08 +0200 Subject: Remove group attribute from problem common.py files --- python/problems/introduction/fahrenheit_to_celsius/common.py | 1 - 1 file changed, 1 deletion(-) (limited to 'python/problems/introduction/fahrenheit_to_celsius') diff --git a/python/problems/introduction/fahrenheit_to_celsius/common.py b/python/problems/introduction/fahrenheit_to_celsius/common.py index 918c643..10a1067 100644 --- a/python/problems/introduction/fahrenheit_to_celsius/common.py +++ b/python/problems/introduction/fahrenheit_to_celsius/common.py @@ -6,7 +6,6 @@ from server.hints import Hint import re id = 180 -group = 'introduction' number = 1 visible = True -- cgit v1.2.1