diff options
Diffstat (limited to 'python/problems/functions/greatest_negative')
-rw-r--r-- | python/problems/functions/greatest_negative/common.py | 5 | ||||
-rw-r--r-- | python/problems/functions/greatest_negative/en.py | 1 | ||||
-rw-r--r-- | python/problems/functions/greatest_negative/sl.py | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/python/problems/functions/greatest_negative/common.py b/python/problems/functions/greatest_negative/common.py index 5d65438..72754e2 100644 --- a/python/problems/functions/greatest_negative/common.py +++ b/python/problems/functions/greatest_negative/common.py @@ -6,7 +6,6 @@ from python.util import has_token_sequence, string_almost_equal, \ from server.hints import Hint id = 197 -group = 'functions' number = 3 visible = True @@ -35,6 +34,10 @@ hint_type = { def test(python, code): + tokens = get_tokens(code) + if not has_token_sequence(tokens, ['def', 'max_neg']): + return False, [{'id' : 'no_func_name', 'args' : {'func_name' : 'max_neg'}}] + test_lists = [[6, 4, 2, 0], [4, 6, 2, -1], [4, -2, -6, 0], diff --git a/python/problems/functions/greatest_negative/en.py b/python/problems/functions/greatest_negative/en.py index a57cb1f..5c2919a 100644 --- a/python/problems/functions/greatest_negative/en.py +++ b/python/problems/functions/greatest_negative/en.py @@ -1,6 +1,5 @@ # coding=utf-8 -id = 197 name = 'Greatest negativist' slug = 'Greatest negativist' diff --git a/python/problems/functions/greatest_negative/sl.py b/python/problems/functions/greatest_negative/sl.py index ea1e47c..31f1fd6 100644 --- a/python/problems/functions/greatest_negative/sl.py +++ b/python/problems/functions/greatest_negative/sl.py @@ -3,7 +3,6 @@ import server mod = server.problems.load_language('python', 'sl') -id = 197 name = 'Največji negativec' slug = 'Največji negativec' |