summaryrefslogtreecommitdiff
path: root/python/problems/functions/greatest
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/functions/greatest
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/functions/greatest')
-rw-r--r--python/problems/functions/greatest/common.py5
-rw-r--r--python/problems/functions/greatest/en.py1
-rw-r--r--python/problems/functions/greatest/sl.py1
3 files changed, 4 insertions, 3 deletions
diff --git a/python/problems/functions/greatest/common.py b/python/problems/functions/greatest/common.py
index 6857603..726fa88 100644
--- a/python/problems/functions/greatest/common.py
+++ b/python/problems/functions/greatest/common.py
@@ -6,7 +6,6 @@ from python.util import has_token_sequence, string_almost_equal, \
from server.hints import Hint
id = 195
-group = 'functions'
number = 1
visible = True
@@ -32,6 +31,10 @@ hint_type = {
}
def test(python, code):
+ tokens = get_tokens(code)
+ if not has_token_sequence(tokens, ['def', 'max_val']):
+ return False, [{'id' : 'no_func_name', 'args' : {'func_name' : 'max_val'}}]
+
test_lists = [[6, 4, 2, 0],
[4, 6, 2, 0],
[4, 2, 6, 0],
diff --git a/python/problems/functions/greatest/en.py b/python/problems/functions/greatest/en.py
index 8a0c883..acf4672 100644
--- a/python/problems/functions/greatest/en.py
+++ b/python/problems/functions/greatest/en.py
@@ -1,6 +1,5 @@
# coding=utf-8
-id = 195
name = 'Maximum number'
slug = 'Maximum number'
diff --git a/python/problems/functions/greatest/sl.py b/python/problems/functions/greatest/sl.py
index a7916a5..12e07fe 100644
--- a/python/problems/functions/greatest/sl.py
+++ b/python/problems/functions/greatest/sl.py
@@ -3,7 +3,6 @@ import server
mod = server.problems.load_language('python', 'sl')
-id = 195
name = 'Največji'
slug = 'Največji'