diff options
Diffstat (limited to 'python/problems/introduction')
19 files changed, 7 insertions, 19 deletions
diff --git a/python/problems/introduction/average/common.py b/python/problems/introduction/average/common.py index c61f7e6..28c7a7e 100644 --- a/python/problems/introduction/average/common.py +++ b/python/problems/introduction/average/common.py @@ -6,7 +6,6 @@ from server.hints import Hint id = 189 -group = 'introduction' number = 4 visible = True diff --git a/python/problems/introduction/average/en.py b/python/problems/introduction/average/en.py index 7742a7d..5ce621e 100644 --- a/python/problems/introduction/average/en.py +++ b/python/problems/introduction/average/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 1000 name = 'Average grade' slug = 'Average grade' diff --git a/python/problems/introduction/average/sl.py b/python/problems/introduction/average/sl.py index d7eafbb..540a9cc 100644 --- a/python/problems/introduction/average/sl.py +++ b/python/problems/introduction/average/sl.py @@ -2,7 +2,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 189 name = 'Povprečna ocena' slug = 'Povprečna ocena' diff --git a/python/problems/introduction/ballistics/common.py b/python/problems/introduction/ballistics/common.py index afb84b6..8cb5c2d 100644 --- a/python/problems/introduction/ballistics/common.py +++ b/python/problems/introduction/ballistics/common.py @@ -5,7 +5,6 @@ from python.util import has_token_sequence, string_almost_equal, \ from server.hints import Hint id = 187 -group = 'introduction' number = 3 visible = True diff --git a/python/problems/introduction/ballistics/en.py b/python/problems/introduction/ballistics/en.py index 34dca8a..6fab80f 100644 --- a/python/problems/introduction/ballistics/en.py +++ b/python/problems/introduction/ballistics/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 1000 name = 'Ballistics' slug = 'Ballistics' diff --git a/python/problems/introduction/ballistics/sl.py b/python/problems/introduction/ballistics/sl.py index fa0fe5d..ee073f8 100644 --- a/python/problems/introduction/ballistics/sl.py +++ b/python/problems/introduction/ballistics/sl.py @@ -2,7 +2,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 187 name = 'Topologija' slug = 'Topologija' diff --git a/python/problems/introduction/common.py b/python/problems/introduction/common.py new file mode 100644 index 0000000..8498d9c --- /dev/null +++ b/python/problems/introduction/common.py @@ -0,0 +1,2 @@ +id = 13 +number = 1 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>''', diff --git a/python/problems/introduction/fast_fingers/common.py b/python/problems/introduction/fast_fingers/common.py index dc04dcf..754679d 100644 --- a/python/problems/introduction/fast_fingers/common.py +++ b/python/problems/introduction/fast_fingers/common.py @@ -5,7 +5,6 @@ from python.util import has_token_sequence, string_almost_equal, \ from server.hints import Hint id = 190 -group = 'introduction' number = 5 visible = True diff --git a/python/problems/introduction/fast_fingers/en.py b/python/problems/introduction/fast_fingers/en.py index de07494..ab4637a 100644 --- a/python/problems/introduction/fast_fingers/en.py +++ b/python/problems/introduction/fast_fingers/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 1000 name = 'Fast fingers' slug = 'Fast fingers' diff --git a/python/problems/introduction/fast_fingers/sl.py b/python/problems/introduction/fast_fingers/sl.py index 0b38a3a..c181951 100644 --- a/python/problems/introduction/fast_fingers/sl.py +++ b/python/problems/introduction/fast_fingers/sl.py @@ -2,7 +2,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 190 name = 'Hitri prsti' slug = 'Hitri prsti' diff --git a/python/problems/introduction/fast_fingers_2/common.py b/python/problems/introduction/fast_fingers_2/common.py index af4439c..c738d45 100644 --- a/python/problems/introduction/fast_fingers_2/common.py +++ b/python/problems/introduction/fast_fingers_2/common.py @@ -5,7 +5,6 @@ from python.util import has_token_sequence, string_almost_equal, \ from server.hints import Hint id = 191 -group = 'introduction' number = 6 visible = True diff --git a/python/problems/introduction/fast_fingers_2/en.py b/python/problems/introduction/fast_fingers_2/en.py index 636f4d0..2172127 100644 --- a/python/problems/introduction/fast_fingers_2/en.py +++ b/python/problems/introduction/fast_fingers_2/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 1000 name = 'Fast fingers 2' slug = 'Fast fingers 2' diff --git a/python/problems/introduction/fast_fingers_2/sl.py b/python/problems/introduction/fast_fingers_2/sl.py index 125bd24..6606fbe 100644 --- a/python/problems/introduction/fast_fingers_2/sl.py +++ b/python/problems/introduction/fast_fingers_2/sl.py @@ -2,7 +2,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 191 name = 'Hitri prsti 2' slug = 'Hitri prsti 2' diff --git a/python/problems/introduction/pythagorean_theorem/common.py b/python/problems/introduction/pythagorean_theorem/common.py index ed49b1a..cebae68 100644 --- a/python/problems/introduction/pythagorean_theorem/common.py +++ b/python/problems/introduction/pythagorean_theorem/common.py @@ -5,7 +5,6 @@ from python.util import has_token_sequence, string_almost_equal, \ from server.hints import Hint id = 188 -group = 'introduction' number = 2 visible = True diff --git a/python/problems/introduction/pythagorean_theorem/en.py b/python/problems/introduction/pythagorean_theorem/en.py index b3c6117..79d7e39 100644 --- a/python/problems/introduction/pythagorean_theorem/en.py +++ b/python/problems/introduction/pythagorean_theorem/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 1000 name = 'Pythagorean theorem' slug = 'Pythagorean theorem' diff --git a/python/problems/introduction/pythagorean_theorem/sl.py b/python/problems/introduction/pythagorean_theorem/sl.py index 21aec9a..9500651 100644 --- a/python/problems/introduction/pythagorean_theorem/sl.py +++ b/python/problems/introduction/pythagorean_theorem/sl.py @@ -2,7 +2,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 188 name = 'Pitagorov izrek' slug = 'Pitagorov izrek' |