summaryrefslogtreecommitdiff
path: root/python/problems/functions/palindromic_numbers/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/problems/functions/palindromic_numbers/common.py')
-rw-r--r--python/problems/functions/palindromic_numbers/common.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/python/problems/functions/palindromic_numbers/common.py b/python/problems/functions/palindromic_numbers/common.py
index 494e2d0..6ebf93f 100644
--- a/python/problems/functions/palindromic_numbers/common.py
+++ b/python/problems/functions/palindromic_numbers/common.py
@@ -8,7 +8,7 @@ number = 8
visible = True
solution = '''\
-def palindromic_numbers():
+def palindromic_number():
xs = []
for i in range(100, 1000):
for j in range(100, 1000):
@@ -22,23 +22,13 @@ hint_type = {
}
def test(python, code, aux_code=''):
- func_name = 'numbers'
+ func_name = 'palindromic_number'
tokens = get_tokens(code)
if not has_token_sequence(tokens, ['def', func_name]):
return False, [{'id' : 'no_func_name', 'args' : {'func_name' : func_name}}]
- in_out = [
- (906609, True),
- (123456, False),
- (1, True),
- (11, True),
- (12, False),
- (113, False),
- (131, True)
- ]
-
- test_in = [(func_name+'(%s)'%str(l[0]), None) for l in in_out]
- test_out = [l[1] for l in in_out]
+ test_in = [(func_name+'()', None)]
+ test_out = [906609]
answers = python(code=aux_code+code, inputs=test_in, timeout=1.0)
n_correct = 0