Datasets:
Unnamed: 0 int64 0 48.6k | userId int64 2 2.38k | name stringclasses 71
values | questionId int64 28 29k | question stringclasses 98
values | exceptedAnswer stringclasses 133
values | attemptId int64 85 185k | state stringclasses 3
values | studentAnswer stringlengths 1 3.39k | testOutcome stringlengths 477 12.6k | attemptstepid int64 238 770k | status int64 1 4 | R_errorcount int64 0 8 | R_traceback stringlengths 8 1.3k | R_errortype stringclasses 14
values | C_errormessage stringlengths 8 927 | C_errortype stringclasses 5
values | all_errortype stringclasses 18
values | all_errortype2 stringclasses 19
values | error_category stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
45,522 | 2,129 | 循环LAB3 | 399 | 编写一个函数count_spaces_and_commas,打印出有几个空格和逗号。
例如:
输入: 你好,我的名字叫 逗猫师。
打印: 有1个逗号和1个空格
输入:我 你 她
打印:有0个逗号和2个空格
输入:,,,
打印:有3个逗号和0个空格
| param = input()
def count_spaces_and_commas(s):
num_spaces = 0
num_commas = 0
for i in s:
if i == " ":
num_spaces += 1
if i == ",":
num_commas += 1
print("有"+ str(num_commas) +"个逗号和" + str(num_spaces) + "个空格")
count_spaces_and_commas(param) | 175,199 | complete | param = input()
# 在此处编写代码
def count_spaces_and_commas(param):
count_spaces = 0
count_commas = 0
for i in param:
if i == ",":
count_spaces += 1
elif i == " ":
count_commas += 1
print("有" + str(count_spaces) + "个逗号和" + str(count_commas) + "个空格"... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:4;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"464";s:10:"questionid";s:3:"399";s:8:"testtype";s:1:"0";s:8:"... | 729,162 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
38,583 | 283 | 递归2.2 | 608 | 设计一个函数palindrom(num), 打印以0为中心向两边展开num次,每次递增1的回文。
例如当num = 0, 输出 "0"
例1:
输入: 0
输出: "0"
解释: 输入是0, 不往两边展开.
例2:
输入: 1
输出: "1 0 1"
解释: 输入是1, 往两边展开1次.
例3:
输入: 2
输出: "2 1 0 1 2"
解释: 输入是2, 往两边展开2次.
| input_int = int(input())
# 请不要更改此行以上的代码
def palindrome(num):
if num == 0:
return "0"
else:
left = str(num) + " "
mid = palindrome(num - 1)
right = " " + str(num)
return left + mid + right
# 请不要更改此行以下的代码
print(palindrome(input_int)) | 151,196 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def palindrome(num):
if num == 0:
return 0# 在这里补全代码
else:
left = num# 在这里补全代码
mid = palindrome(num-1) # 在这里补全代码 )
right =num# 在这里补全代码
return str(left)+''+ str(mid)+''+ str(right)
# 请不要更改此行以下的代码
print(palindrome(inp... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:4;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:1;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"689";s:10:"questionid";s:3:"608";s:8:"testtype";s:1:"0";s:8:"... | 633,763 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
31,880 | 1,049 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 117,475 | complete | a=input()
print(a+" ") | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2263";s:10:"questionid";s:4:"2931";s:8:"testtype";s:1:"0";s:8... | 494,311 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
28,333 | 815 | 字典LAB0.2 | 551 | 提供一个int字典my_dict,若其中含有key为1,3,5,7的项,则将这些项删除。
如:
my_dict = {1:0, 3:1, 5:9, 7:16}
执行完毕后应为:
my_dict = {}
如:
my_dict = {1:7, 5:9, 0:20}
执行完毕后应为:
my_dict = {0:20}
如:
my_dict = {0:20, 2:40, 4:60}
执行完毕后应为:
my_dict = {0:20, 2:40, 4:60}
| input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
to_delete = [1,3,5,7]
for i in to_delete:
if i in my_dict:
del my_dict[i]
# 请不要更改此行以下的代码
print(my_dict) | 83,379 | todo | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
my_dict = {}
if 1 in my_dict:
del my_dict[1]
if 3 in my_dict:
del my_dict[3]
if 5 in my_dict:
del my_dict[5]
if 7 in my_dict:
del my_dict[7]
# 请不要更改此行以下的代码
print(my_dict) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:2;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"609";s:10:"questionid";s:3:"551";s:8:"testtype";s:1:"0";s:8:"... | 375,254 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
43,296 | 1,437 | 循环3.2 | 394 | 打印出输入字符串的长度。
如:
输入:CircleCat
打印:9
| param = input()
print(len(param)) | 165,498 | complete | param = input()
print(len(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:4;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"443";s:10:"questionid";s:3:"394";s:8:"testtype";s:1:"0";s:8:"... | 692,043 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
33,381 | 1,090 | 函数1.0 | 6,231 | 定义一个叫做 WELCOME_TO_CIRCLE_CAT() 的函数,它的内容是打印以下这句话
"Welcome to circle cat!"
并使用这个函数2次(不包含题目内的一次)。
| def welcome_to_circle_cat():
print("Welcome to circle cat!")
welcome_to_circle_cat()
welcome_to_circle_cat()
# 请不要更改此行以下的代码
welcome_to_circle_cat() | 125,117 | complete | # 在这里编写代码
def welcome_to_circle_cat():
print("Welcome to circle cat!")
welcome_to_circle_cat()
welcome_to_circle_cat()
# 请不要更改此行以下的代码
welcome_to_circle_cat() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:1;s:10:"actualmark";d:1;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"3190";s:10:"questionid";s:4:"6231";s:8:"testtype";s:1:"0";s:8... | 531,302 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,543 | 70 | 字典LAB0.1 | 253 | 定义一个字典num_to_word,把0-10的数字(int)转换为汉字(str)。
例1:
print(num_to_word[7])
应输出
七
例2:
print(num_to_word[10])
应输出
十
| input_int = int(input())
# 请不要更改此行以上的代码
num_to_word = {1:"一", 2:"二", 3:"三", 4:"四", 5:"五", 6:"六", 7:"七", 8:"八", 9:"九", 10:"十"}
# 请不要更改此行以下的代码
print(num_to_word[input_int]) | 7,204 | complete | input_int = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
num_to_word = {0:'零',1:'一',2:'二',3:'三',4:'四',5:'五',6:'六',7:'七',8:'八',9:'九',10:'十'}
# 请不要更改此行以下的代码
print(num_to_word[input_int]) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"246";s:10:"questionid";s:3:"253";s:8:"testtype";s:1:"0";s:8:"... | 38,675 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
33,391 | 1,127 | Lab2.1 | 346 | 定义一个叫做smallest_among_three的函数,输入三个参数,打印最小的参数。
| x = int(input())
y = int(input())
z = int(input())
def smallest_among_three(x, y, z):
if (x < y):
if (x < z):
return x
else:
return z
else:
if (y < z):
return y
else:
return z
print(smallest_among_three(x, y, z)) | 125,146 | todo | x = int(input())
y = int(input())
z = int(input())
# 在这里补全代码
def smallest_among_three(x, y, z)
if (x > y) and (x > z):
print(x)
elif (y > x) and (y >z):
print(y)
elif (z > x) and (z > y):
print(z)
smallest_among_three(x, y, z) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:141:" File "__tester__.python3", line 6
def smallest_among_three(x, y, z)
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:3;s:10:"actualmark";i:0;... | 531,415 | 2 | 0 | No error | No error | File "__tester__.python3", line 6
def smallest_among_three(x, y, z)
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
27,474 | 499 | 递归LAB1 | 611 | 编写一个函数fib_3(num),返回以下数列的第num项(从0开始)。
1, 1, 1, 3, 5, 9, 17, 31 ......
其中每项等于前三项的和, 第num项应是 第num-1, num - 2, num -3项的和。
| input_int = int(input())
# 请不要更改此行以上的代码
def fib_3(num):
if num == 0:
return 1
elif num == 1:
return 1
elif num == 2:
return 1
else:
return fib_3(num - 2) + fib_3(num - 1) + fib_3(num - 3)
# 请不要更改此行以下的代码
print(fib_3(input_int)) | 78,544 | complete | input_int = int(input())
# 请不要更改此行以上的代码
def fib_3(num):
if num == 0 :# 在这里补充代码:
return 1# 在这里补充代码
elif num == 1 :# 在这里补充代码:
return 1# 在这里补充代码
elif num == 2 :# 在这里补充代码:
return 1# 在这里补充代码
else:
return fib_3(num-3)+fib_3(num-2)+fib_3(num-1)# 在这里补充代码
# 请不要更改此行以下的代码
print(... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:6;s:10:"actualmark";d:6;s:11:"testresults";a:6:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"705";s:10:"questionid";s:3:"611";s:8:"testtype";s:1:"0";s:8:"... | 348,794 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
48,150 | 2,179 | 字典LAB2 | 6,290 | 【考勤计数器】
编写一个程序来记录考勤,包含两个函数:
log_user(user_name) 不返回任何信息,记录user_name的一次到课
print_user_log(user_name) 不返回任何信息,打印user_name到课几次
如:
log_user("Circle")
log_user("Circle")
log_user("Cat")
log_user("Circle")
print_user_log("Circle")
print_user_log("Cat")
print_user_log("Flirter")
结果为:
3
1
0
如果没有思路请看下面提示
第̶一̶步̶:̶定̶义... | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
user_info = {}
def log_user(user_name):
if user_name in user_info:
user_info[user_name] += 1
else:
user_info[user_name] = 1
def print_user_log(user_name):
if user_name in user_info:
print(user_in... | 183,947 | todo | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
user_info={}
def log_user(user_name):
#为啥这句不需要log_user={'user_name':user_name,'value':value}
if user_name in user_info:
user_info[user_name]['value']+=1
else:
user_info[user_name]={'user_name':user_name,'value':1}
... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"3241";s:10:"questionid";s:4:"6290";s:8:"testtype";s:1:"0";s:8... | 764,026 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 21, in <module>
print_user_log(i)
File "__tester__.python3", line 14, in print_user_log
print (user_info[user_name])
KeyError: 'Flirter'
" | KeyError | No error | No error | KeyError | KeyError | error |
39,976 | 1,153 | 递归2.2 | 608 | 设计一个函数palindrom(num), 打印以0为中心向两边展开num次,每次递增1的回文。
例如当num = 0, 输出 "0"
例1:
输入: 0
输出: "0"
解释: 输入是0, 不往两边展开.
例2:
输入: 1
输出: "1 0 1"
解释: 输入是1, 往两边展开1次.
例3:
输入: 2
输出: "2 1 0 1 2"
解释: 输入是2, 往两边展开2次.
| input_int = int(input())
# 请不要更改此行以上的代码
def palindrome(num):
if num == 0:
return "0"
else:
left = str(num) + " "
mid = palindrome(num - 1)
right = " " + str(num)
return left + mid + right
# 请不要更改此行以下的代码
print(palindrome(input_int)) | 154,808 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def palindrome(num):
if num == 0:
return 0
else:
left =num # 在这里补全代码
mid = palindrome( num-1)
right = num
return str(left) + str(mid) + str(right)
# 请不要更改此行以下的代码
print(palindrome(input_int)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:4;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:1;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"689";s:10:"questionid";s:3:"608";s:8:"testtype";s:1:"0";s:8:"... | 647,187 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
6,193 | 260 | 函数1.0 | 402 | 定义一个叫做 WELCOME_TO_CIRLCLE_CAT() 的函数,它的内容是打印以下这句话
"Welcome to circle cat!"
并使用这个函数2次(不包含题目内的一次)。
| def welcome_to_cirlcle_cat():
print("Welcome to circle cat!")
welcome_to_cirlcle_cat()
welcome_to_cirlcle_cat()
# 请不要更改此行以下的代码
welcome_to_cirlcle_cat() | 11,951 | todo | # 在这里编写代码
def welcome_to_cirlcle_cat():
print("Welcome to circle cat!")
# 请不要更改此行以下的代码
welcome_to_cirlcle_cat();
welcome_to_cirlcle_cat(); | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:1;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"476";s:10:"questionid";s:3:"402";s:8:"testtype";s:1:"0";s:8:"... | 61,062 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
28,286 | 858 | 分支 1.6 | 3,126 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int并存入变量num_spiders。
* 给变量web_size的初始值赋值为1。
* 如果num_spiders等于10,web_size变成原来的两倍;
* 否则,web_size变成原来的三倍,并且num_spiders加5。
* 最后,把num_spiders和web_size按顺序打印在同一行,用一个空格分开。
例1:
输入:10
输出:10 2
解释:num_spiders等于10,所以web_size变为原来的两倍。
例2:
输入:15
输出:20 3
解释:num_spiders等于15,不符合等于10的条件,所以web_siz... | num_spiders = int(input())
web_size = 1
if num_spiders == 10:
web_size = 2 * web_size
else:
web_size = 3 * web_size
num_spiders = num_spiders + 5
print(num_spiders,web_size) | 83,217 | todo | num_spiders=int()
web_size=1
if num_spiders==10:
web_size= web_size * 2
else:
num_spiders=num_spiders+5
web_size= web_size * 3
print(num_spiders,web_size) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:106:"Sorry: IndentationError: unindent does not match any outer indentation level (__tester__.python3, line 7)
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sour... | 374,703 | 2 | 0 | No error | No error | Sorry: IndentationError: unindent does not match any outer indentation level (__tester__.python3, line 7)
| IndentationError | IndentationError | IndentationError | error |
14,440 | 470 | 变量和赋值 3.6 | 3,020 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int并乘3。
* 打印出新的值,并创建一个新的空行。
例1:
输入:1
输出:3
解释:1 * 3 = 3
例2:
输入:5
输出:15
解释:5 * 3 = 15
| my_val = int(input())
my_val = my_val * 3
print(my_val) | 37,669 | complete | a=int(input())
b=a*3
print(b)
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2295";s:10:"questionid";s:4:"3020";s:8:"testtype";s:1:"0";s:8... | 171,103 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
24,488 | 482 | 循环3.4 | 396 | 编写一个函数count_ones,输入一个int,数有几位1。
例:
输入:100010010
返回:3
| param = int(input())
def count_ones(param):
count = 0
for i in str(param):
if i == "1":
count += 1
return count
print(count_ones(param)) | 67,111 | todo | param = int(input())
# 在此处编写代码
a=0
def count_ones(x):
for i in x:
if i==1:
a+=1
print(a)
print(count_ones(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"451";s:10:"questionid";s:3:"396";s:8:"testtype";s:1:"0";s:8:"... | 295,955 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 11, in <module>
print(count_ones(param))
File "__tester__.python3", line 6, in count_ones
for i in x:
TypeError: 'int' object is not iterable
" | TypeError | No error | No error | TypeError | TypeError | error |
16,046 | 515 | 范围 3.7 | 3,281 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int,存入num_students。
* 如果num_students小于50,打印'没到齐';
* 否则,打印'到齐了'。
例1:
输入:30
输出:没到齐
解释:30 < 50
例2:
输入:50
输出:到齐了
解释:50不符合小于50的条件。
| num_students = int(input())
if num_students < 50:
print('没到齐')
else:
print('到齐了')
| 43,115 | complete | num_students=int(input())
if num_students<50:
print('没到齐')
else:
print('到齐了') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2350";s:10:"questionid";s:4:"3281";s:8:"testtype";s:1:"0";s:8... | 193,844 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
30,765 | 977 | 字典LAB1 | 553 | 【用户名密码验证】
编写一个程序做到添加/验证用户名密码,包含两个函数:
add_user(user_name, pass_word) 不返回任何信息,用于添加一个用户,用户名是user_name,密码是pass_word
verify_user(user_name, pass_word)返回Boolean值(代表用户名密码是否正确),如果存在用户名为user_name,密码为pass_word的用户,则返回True,密码错误或者用户不存在则返回False
如:
add_user("circle", "cat")
print(verify_user("circle","cat"))
print(verify_user("... | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
user_info = {}
def add_user(user_name, pass_word):
user_info[user_name] = pass_word
def verify_user(user_name, pass_word):
if user_name in user_info:
if user_info[user_name] == pass_word:
return True
return False
# 请不要... | 107,193 | todo | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
user_info={}
def add_user(user_name, pass_word):
user_info[user_name] = pass_word
return user_info
def verify_user(user_name, pass_word):
for key in user_info:
if key == user_name and user_info[user_name] == pass... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:3;s:10:"actualmark";d:1;s:11:"testresults";a:3:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"616";s:10:"questionid";s:3:"553";s:8:"testtype";s:1:"0";s:8:"... | 455,768 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
19,049 | 410 | 列表1.6 | 445 | 将输入的input_list_0, input_list_1连起来赋值给一个新的变量my_list, 并将my_list里的第0项删除,再将新的第0项设置为'x'。
| input_list_0 = input().split(',')
input_list_1 = input().split(',')
# 请不要更改此行以上的代码
my_list = input_list_0 + input_list_1
del my_list[0]
my_list[0] = 'x'
# 请不要更改此行以下的代码
print(",".join(my_list)) | 53,024 | complete | input_list_0 = input().split(',')
input_list_1 = input().split(',')
# 请不要更改此行以上的代码
my_list=input_list_0 + input_list_1
del my_list[0]
my_list[0]="x"
# 在这里编写代码
# 请不要更改此行以下的代码
print(",".join(my_list)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:3;s:10:"actualmark";d:3;s:11:"testresults";a:3:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"477";s:10:"questionid";s:3:"445";s:8:"testtype";s:1:"0";s:8:"... | 232,550 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
8,051 | 339 | 列表LAB3 | 544 | 请写一个函数add_matrix(),传入两个二维列表参数matrix_1, matrix_2; 其中每个有n个长度为m的列表,其中都是int,返回一个二维列表,内容是前两个列表的和(对应的位置相加)。
例1:
输入
matrix_1 = [[7, 8],
[4, 1]]
matrix_2 = [[3, 7],
[4, 3]]
返回
[[10, 15],
[8, 4]]
例2:
输入
matrix_1 = [[0]]
matrix_2 = [[1]]
返回
[[1]]
例3:
输入
matrix_1 = [[1, 1, 1],
[2, 1... | import ast
input_list_1 = ast.literal_eval(input())
input_list_2 = ast.literal_eval(input())
# 请不要更改此行以上的代码
def add_matrix(matrix_1, matrix_2):
for i in range(0, len(matrix_1)):
for j in range(0, len(matrix_1[i])):
matrix_1[i][j] = matrix_1[i][j] + matrix_2[i][j]
return matrix_1
# 请不要更改此行以... | 16,748 | todo | import ast
input_list_1 = ast.literal_eval(input())
input_list_2 = ast.literal_eval(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def add_matrix(matrix_1, matrix_2):
result = []
for i in range(len(matix_1)):
row = []
for j in range(len(matriz_1[i])):
row.append(matrix_1[i][j]) + matr... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:8;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"565";s:10:"questionid";s:3:"544";s:8:"testtype";s:1:"0";s:8:"... | 95,720 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 16, in <module>
print(add_matrix(input_list_1, input_list_2))
File "__tester__.python3", line 9, in add_matrix
for i in range(len(matix_1)):
NameError: name 'matix_1' is not defined
" | NameError | No error | No error | NameError | NameError | error |
28,075 | 878 | 变量和赋值 3.6 | 3,020 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int并乘3。
* 打印出新的值,并创建一个新的空行。
例1:
输入:1
输出:3
解释:1 * 3 = 3
例2:
输入:5
输出:15
解释:5 * 3 = 15
| my_val = int(input())
my_val = my_val * 3
print(my_val) | 82,563 | todo | a=int(input())
b=int(input())
print(a*b)
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2295";s:10:"questionid";s:4:"3020";s:8:"testtype";s:1:"0";s:8... | 371,697 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 2, in <module>
b=int(input())
EOFError: EOF when reading a line
" | EOFError | No error | No error | EOFError | EOFError | error |
9,925 | 344 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 23,378 | todo | param = input()
def reverse_string(a):
b=a[::-1]
print(b)
print(reverse_string(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:4;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:0;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"456";s:10:"questionid";s:3:"397";s:8:"testtype";s:1:"0";s:8:"... | 123,260 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
4,056 | 31 | 字典LAB0.1 | 253 | 定义一个字典num_to_word,把0-10的数字(int)转换为汉字(str)。
例1:
print(num_to_word[7])
应输出
七
例2:
print(num_to_word[10])
应输出
十
| input_int = int(input())
# 请不要更改此行以上的代码
num_to_word = {1:"一", 2:"二", 3:"三", 4:"四", 5:"五", 6:"六", 7:"七", 8:"八", 9:"九", 10:"十"}
# 请不要更改此行以下的代码
print(num_to_word[input_int]) | 6,814 | complete | input_int = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
num_to_word = {0:'零',1:'一',2:'二',3:'三',4:'四',5:'五',6:'六',7:'七',8:'八',9:'九',10:'十'}
# 请不要更改此行以下的代码
print(num_to_word[input_int]) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"246";s:10:"questionid";s:3:"253";s:8:"testtype";s:1:"0";s:8:"... | 37,498 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
43,111 | 1,425 | 变量和赋值 3.5 | 3,018 | 按要求写出代码。
* 要求:
* 用户会输入两个数值,依次是猫的数量num_cats,一个是狗的数量num_dogs。
* 打印猫和狗总共的数量,并创建一个新的空行。
例1:
输入:1 2
输出:3
解释:1 + 2 = 3
例2:
输入:20 20
输出:40
解释:20 + 20 = 40
| total_animals = 0
num_cats = int(input())
num_dogs = int(input())
total_animals = num_cats + num_dogs
print(total_animals) | 164,947 | complete | num_cats = int(input(""))
num_dogs = int(input(""))
sum = num_cats +num_dogs
print(sum)
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2285";s:10:"questionid";s:4:"3018";s:8:"testtype";s:1:"0";s:8... | 690,104 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
30,645 | 985 | 2.5 | 2,974 | 把下面代码中的语法错误改好,重新写出来。
print('I can")
print(swim.)
my_age = 10
print('my age:' my_age)
| print('I can')
print('swim.')
my_age = 10
print('my age:', my_age) | 106,196 | todo | print('I can ')
print('swim.')
my_age = 10
print('my age:' my_age) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:115:" File "__tester__.python3", line 4
print('my age:' my_age)
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s... | 452,519 | 2 | 0 | No error | No error | File "__tester__.python3", line 4
print('my age:' my_age)
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
32,235 | 1,069 | 块&缩进 6.2 | 3,464 | 把下面的代码改成正确的缩进形式,补在题目中标明的位置。
1
2
3
4
5
6
7
if num_spiders > 10:
if num_cats > num_spiders:
print("猫会吃掉蜘蛛")
else:
print("猫吃不完蜘蛛")
else:
print('蜘蛛很少')
* 要求:
* 当num_spiders大于10时,如果num_cats大于num_spiders,则打印‘猫会吃掉蜘蛛’
* 当num_spiders大于10时,如果num_cats小于或等于num_spiders,则打印'猫吃不完蜘蛛'
* 当num_spiders小于或等于10时,打印'蜘蛛很少'。
例1:
输入... | num_spiders = int(input())
num_cats = int(input())
if num_spiders > 10:
if num_cats > num_spiders:
print("猫会吃掉蜘蛛")
else:
print("猫吃不完蜘蛛")
else:
print('蜘蛛很少') | 119,619 | todo | num_spiders = int(input())
num_cats = int(input())
if num_spiders > 10:
num_cats > num_spiders:
print("猫会吃掉蜘蛛")
else:
num_cats <= num_spiders:
print("猫吃不完蜘蛛")
else:
num_spiders <=10
print('蜘蛛很少') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:121:" File "__tester__.python3", line 4
num_cats > num_spiders:
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a... | 508,494 | 2 | 0 | No error | No error | File "__tester__.python3", line 4
num_cats > num_spiders:
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
20,233 | 735 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 57,016 | todo | age = int(input())
print('my age is + age') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:2;s:10:"actualmark";d:0;s:11:"testresults";a:2:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"377";s:10:"questionid";s:3:"339";s:8:"testtype";s:1:"0";s:8:"... | 253,731 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
14,095 | 440 | 循环LAB4 | 400 | 请编写一个函数is_palindrome,判断输入的字符串是否是回文(什么是回文?)
例如:
输入:CircleCat
返回:False
输入: TAT
返回:True
输入:A
返回:True
| param = input()
def is_palindrome(s):
return s == s[::-1]
print(is_palindrome(param)) | 36,606 | complete | param = input()
def is_palindrome(x):
a = ""
for i in x:
a = i + a
if a == x:
return True
else:
return False
print(is_palindrome(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:8;s:10:"actualmark";d:8;s:11:"testresults";a:8:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"468";s:10:"questionid";s:3:"400";s:8:"testtype";s:1:"0";s:8:"... | 172,895 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
41,156 | 111 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 159,620 | complete | a=input()
print(a)
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2263";s:10:"questionid";s:4:"2931";s:8:"testtype";s:1:"0";s:8... | 669,324 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
40,452 | 1,304 | 列表LAB1 | 542 | 写一个函数replace_element_in_list(),传入三个参数:input_list (string格式的整数列表), num_from (int), num_to (int),
将input_list中所有的num_from换成num_to。
比如:
input_list = ['1','2','3','4','1','2','3','2']
num_from = 2
num_to = 10
执行完毕后,input_list = ['1','10','3','4','1','10','3','10']
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果,直接更改原列表并返回。
| input_list = input().split(',')
num_1 = int(input())
num_2 = int(input())
# 请不要更改此行以上的代码
def replace_element_in_list(input_list, num_from, num_to):
for i in range(0, len(input_list)):
if int(input_list[i]) == num_from:
input_list[i] = str(num_to)
return input_list
# 请不要更改此行以下的代码
print(repl... | 156,457 | complete | input_list = input().split(',')
num_1 = int(input())
num_2 = int(input())
# 请不要更改此行以上的代码
def replace_element_in_list(input_list,num_1,num_2):
count = 0
for i in input_list:
if (int(i) == num_1):
input_list[count] = str(num_2)
count += 1
return input_list
# 请不要更改此行以下的... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:4;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"555";s:10:"questionid";s:3:"542";s:8:"testtype";s:1:"0";s:8:"... | 654,194 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
31,831 | 282 | 递归2.2 | 608 | 设计一个函数palindrom(num), 打印以0为中心向两边展开num次,每次递增1的回文。
例如当num = 0, 输出 "0"
例1:
输入: 0
输出: "0"
解释: 输入是0, 不往两边展开.
例2:
输入: 1
输出: "1 0 1"
解释: 输入是1, 往两边展开1次.
例3:
输入: 2
输出: "2 1 0 1 2"
解释: 输入是2, 往两边展开2次.
| input_int = int(input())
# 请不要更改此行以上的代码
def palindrome(num):
if num == 0:
return "0"
else:
left = str(num) + " "
mid = palindrome(num - 1)
right = " " + str(num)
return left + mid + right
# 请不要更改此行以下的代码
print(palindrome(input_int)) | 117,002 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def palindrome(num):
if num == 0:
return 0# 在这里补全代码
else:
left = num# 在这里补全代码
mid = palindrome(num-1) # 在这里补全代码 )
right = num# 在这里补全代码
return str(left) + str(mid) + str(right)
# 请不要更改此行以下的代码
print(palindrome(in... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:4;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:1;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"689";s:10:"questionid";s:3:"608";s:8:"testtype";s:1:"0";s:8:"... | 491,734 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
39,943 | 1,304 | Lab2.1 | 346 | 定义一个叫做smallest_among_three的函数,输入三个参数,打印最小的参数。
| x = int(input())
y = int(input())
z = int(input())
def smallest_among_three(x, y, z):
if (x < y):
if (x < z):
return x
else:
return z
else:
if (y < z):
return y
else:
return z
print(smallest_among_three(x, y, z)) | 154,671 | todo | x = int(input())
y = int(input())
z = int(input())
# 在这里补全代码
def smallest_among_three(x,y,z):
if (x < y and x < z):
return x
elif (y < x and y < z):
return y
elif (z < x and z < y):
return z
else:
return None
print(smallest_among_three(x, y, z)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:106:"Sorry: IndentationError: unindent does not match any outer indentation level (__tester__.python3, line 9)
";s:11:"maxpossmark";d:3;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sour... | 646,951 | 2 | 0 | No error | No error | Sorry: IndentationError: unindent does not match any outer indentation level (__tester__.python3, line 9)
| IndentationError | IndentationError | IndentationError | error |
12,655 | 415 | 判断debug1 | 368 | 以下有一个函数convert_num, 若输入的内容大于10(包括10),则将其减去10。
代码中有错误,请改正其中的错误。
| param = int(input())
def convert_num(input_num):
if (input_num >= 10):
input_num = input_num - 10
print(input_num)
convert_num(param) | 32,942 | todo | param = int(input())
def convert_num(param):
if (param >= 10):
param = param - 10
return param
print(convert_num(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:3;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"418";s:10:"questionid";s:3:"368";s:8:"testtype";s:1:"0";s:8:"... | 149,519 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
1,842 | 44 | 判断2 | 70 | 定义一个函数get_age_status,
输入年龄,如果在0至18(不含),打印“未成年人”;
如果在18-65(不含),打印“工作中”;
如果在65以上,打印“退休了”。
| param = int(input())
def get_age_status(age):
if age < 18:
return "未成年人"
elif age < 65:
return "工作中"
else:
return "退休了"
print(get_age_status(param)) | 2,704 | todo | param = int(input())
# 在此补全代码
def get_age_status(param):
if (0 < param < 18):
return "未成年人"
elif (18 <= param < 65):
return "工作中"
elif (param < 65):
return "退休了"
print(get_age_status(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:142:" File "__tester__.python3", line 7
elif (18 <= param < 65):
^
SyntaxError: invalid character in identifier
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s... | 14,149 | 2 | 0 | No error | No error | File "__tester__.python3", line 7
elif (18 <= param < 65):
^
SyntaxError: invalid character in identifier
| SyntaxError | SyntaxError | SyntaxError | error |
41,009 | 1,331 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 158,966 | complete | age = int(input())
print("my age is",age) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:2;s:10:"actualmark";d:2;s:11:"testresults";a:2:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"377";s:10:"questionid";s:3:"339";s:8:"testtype";s:1:"0";s:8:"... | 666,302 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
1,036 | 37 | 循环LAB4 | 99 | 请编写一个函数is_palindrome,判断输入的字符串是否是回文(什么是回文?)
例如:
输入:CircleCat
返回:False
输入: TAT
返回:True
输入:A
返回:True
| param = input()
def is_palindrome(s):
return s == s[::-1]
print(is_palindrome(param)) | 1,498 | todo | param = input()
# 在此处编写代码
def is_palindrome(param):
d = len(param)
for i in range (0,d):
p = d - i
f = param[i:i+1]
s = param[p-1:p]
if f != s:
return "false"
else:
return "true"
print(is_palindrome(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:8;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:8;s:10:"actualmark";d:0;s:11:"testresults";a:8:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"111";s:10:"questionid";s:2:"99";s:8:"testtype";s:1:"0";s:8:"t... | 14,402 | 1 | 8 | No error | No error | No error | No error | No error | LogicError | error |
11,582 | 195 | 字典LAB1 | 553 | 【用户名密码验证】
编写一个程序做到添加/验证用户名密码,包含两个函数:
add_user(user_name, pass_word) 不返回任何信息,用于添加一个用户,用户名是user_name,密码是pass_word
verify_user(user_name, pass_word)返回Boolean值(代表用户名密码是否正确),如果存在用户名为user_name,密码为pass_word的用户,则返回True,密码错误或者用户不存在则返回False
如:
add_user("circle", "cat")
print(verify_user("circle","cat"))
print(verify_user("... | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
user_info = {}
def add_user(user_name, pass_word):
user_info[user_name] = pass_word
def verify_user(user_name, pass_word):
if user_name in user_info:
if user_info[user_name] == pass_word:
return True
return False
# 请不要... | 29,554 | complete | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
user_info={}
def add_user(user_name,pass_word):
if user_name not in user_info:
user_info[user_name]=pass_word
return user_info
def verify_user(user_name,pass_word):
if user_name in user_info:
if user_info[user_... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:3;s:10:"actualmark";d:3;s:11:"testresults";a:3:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"616";s:10:"questionid";s:3:"553";s:8:"testtype";s:1:"0";s:8:"... | 289,353 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
7,495 | 166 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 15,000 | todo | age = int(input())
print("my age is " age) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:118:" File "__tester__.python3", line 3
print("my age is " age)
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:2;s:10:"actualmark";i:0;s:11:"testresults";a:0:... | 76,423 | 2 | 0 | No error | No error | File "__tester__.python3", line 3
print("my age is " age)
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
23,253 | 613 | 列表3.1 | 472 | 请编写一个函数get_max(),传入一个列表参数my_list,其中的值都是格式为string的正整数,返回该列表里的最大数。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果。
| temp_list = input().split(',')
# 请不要更改此行以上的代码
def get_max(my_list):
num_max = 0
for i in my_list:
num_max = max(int(i), num_max)
return num_max
# 请不要更改此行以下的代码
print(get_max(temp_list)) | 63,992 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def get_max(my_list) :
i = 0
max_num = int(my_list[0])
for str_num in my_list :
if max_num < int(my_list[i+1]) :
max_num = my_list[i+1]
i += 1
return max_num
# 请不要更改此行以下的... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"492";s:10:"questionid";s:3:"472";s:8:"testtype";s:1:"0";s:8:"... | 283,603 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 18, in <module>
print(get_max(temp_list))
File "__tester__.python3", line 10, in get_max
if max_num < int(my_list[i+1]) :
TypeError: '<' not supported between instances of 'str' and 'int'
" | TypeError | No error | No error | TypeError | TypeError | error |
32,543 | 1,033 | 循环LAB2 | 398 | 编写一个函数increment_by_three,输入两个int x和y,从x开始打印,并以三为间隔打印比y小的所有数。
例如:
输入: 0 10
打印:
0
3
6
9
输入: 1 4
打印:
1
输入:1 5
打印:
1
4
| x = int(input())
y = int(input())
def increment_by_three(x, y):
while(x < y):
print(x)
x += 3
increment_by_three(x, y) | 120,756 | todo | x = int(input())
y = int(input())
def increment_by_three(x,y):
while x<y:
return x
x=x+3
print(increment_by_three(x, y)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:4;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:0;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"460";s:10:"questionid";s:3:"398";s:8:"testtype";s:1:"0";s:8:"... | 524,797 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
14,914 | 341 | 递归2.3 | 609 | 设计一个函数palindrom(x, y), 打印以0为中心向两边展开x次,每次递增y的回文。
例1:
输入: 0 1
输出: "0"
解释: x是0, 不往两边展开.
例2:
输入: 1 3
输出: "3 0 3"
解释: x是1, 往两边展开1次, y是3, 每次增加3.
例3:
输入: 2 5
输出: "10 5 0 5 10"
解释: x是2, 往两边展开2次, y是5, 每次增加5.
| input_int_0 = int(input())
input_int_1 = int(input())
# 请不要更改此行以上的代码
def palindrome(x, y):
if x == 0:
return "0"
else:
left = str(x * y) + " "
mid = palindrome(x - 1, y)
right = " " + str(x * y)
return left + mid + right
# 请不要更改此行以下的代码
print(palindrome(input_int_0,... | 38,824 | complete | input_int_0 = int(input())
input_int_1 = int(input())
# 请不要更改此行以上的代码
def palindrome(x, y):
if x==0:
return 0
if x==1:
return str(y)+' '+'0'+' '+str(y)
else:
left=str(x*y)+' '
mid=str(palindrome((x-1),y))
right=' '+str(x*y)
return left+mid+right# ... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"694";s:10:"questionid";s:3:"609";s:8:"testtype";s:1:"0";s:8:"... | 175,870 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
10,412 | 390 | 递归2.3 | 593 | 用递归编写一个函数x_power_of_y(x, y)计算x的y次方。
如x_power_of_y(2, 3) 应返回2的3次方,即8;
x_power_of_y(3, 2) 应返回3的2次方,即9;
x_power_of_y(4, 3) 应返回4的3次方,即64。
| input_x = int(input())
input_y = int(input())
# 请不要更改此行以上的代码
def x_power_of_y(x, y):
if x == 0:
return 0
if y == 0:
return 1
else:
return x * x_power_of_y(x, y - 1)
# 请不要更改此行以下的代码
print(x_power_of_y(input_x, input_y)) | 25,373 | complete | input_x = int(input())
input_y = int(input())
# 请不要更改此行以上的代码
def x_power_of_y(x, y):
# 在此补充
if y == 0:
return 1
else:
return x_power_of_y(x,y-1)*x
# 请不要更改此行以下的代码
print(x_power_of_y(input_x, input_y)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"676";s:10:"questionid";s:3:"593";s:8:"testtype";s:1:"0";s:8:"... | 135,924 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
36,973 | 72 | 输入和输出 1.12 | 2,929 | 按要求写出代码。
* 要求:
* 打印:
*
你好
再见
(第一行有七个空格,最后有一个新的空行)
| print(" 你好\n再见") | 146,120 | complete | print(" 你好")
print("再见")
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:1;s:10:"actualmark";d:1;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2257";s:10:"questionid";s:4:"2929";s:8:"testtype";s:1:"0";s:8... | 609,065 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
47,131 | 2,179 | 列表3.1 | 472 | 请编写一个函数get_max(),传入一个列表参数my_list,其中的值都是格式为string的正整数,返回该列表里的最大数。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果。
| temp_list = input().split(',')
# 请不要更改此行以上的代码
def get_max(my_list):
num_max = 0
for i in my_list:
num_max = max(int(i), num_max)
return num_max
# 请不要更改此行以下的代码
print(get_max(temp_list)) | 181,329 | complete | temp_list = input().split(',')
# 请不要更改此行以上的代码
def get_max(my_list):
max_number=int(my_list[0])
for i in range(1,len(my_list)):
if int(my_list[i])>max_number:
max_number=int(my_list[i])
return max_number
#if my_list[1]>max_number:
#max_number=my_list[1]
... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:4;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"492";s:10:"questionid";s:3:"472";s:8:"testtype";s:1:"0";s:8:"... | 758,943 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
16,491 | 413 | 输入和输出 1.10 | 2,925 | 按要求写出代码。
* 要求:
* 打印:"生日快乐!"(不打印引号)
| print("生日快乐!") | 44,300 | todo | print('生日快乐!') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:1;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2253";s:10:"questionid";s:4:"2925";s:8:"testtype";s:1:"0";s:8... | 198,768 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
1,410 | 45 | 判断1 | 69 | 补全代码,定义一个函数get_discount(),如果用户的身高小于140(不含),返回票价0,否则返回票价100。
| param = int(input())
def get_discount(height):
if (height < 140):
return 0
else:
return 100
print(get_discount(param)) | 2,050 | complete | param = int(input())
def get_discount(param):
if param <140:
return (0)
else:
return(100)
print(get_discount(param)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:2:"48";s:10:"questionid";s:2:"69";s:8:"testtype";s:1:"0";s:8:"te... | 9,587 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
9,363 | 195 | 范围 3.6 | 3,279 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int,存入film_rate。
* 如果film_rate大于7,打印'好看';
* 否则,打印'不好看'。
例1:
输入:8
输出:好看
解释:8 > 7,所以打印'好看'。
例2:
输入:7
输出:不好看
解释:7 = 7,不符合大于7的条件。所以打印'不好看'。
| film_rate = int(input())
if film_rate > 7:
print('好看')
else:
print('不好看')
| 21,932 | complete | film_rate=int(input())
if film_rate>7:
print('好看')
else:
print('不好看') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2340";s:10:"questionid";s:4:"3279";s:8:"testtype";s:1:"0";s:8... | 109,896 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
44,344 | 2,064 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 170,060 | complete | print(input())
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2263";s:10:"questionid";s:4:"2931";s:8:"testtype";s:1:"0";s:8... | 710,514 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
11,578 | 195 | 字典LAB0.2 | 551 | 提供一个int字典my_dict,若其中含有key为1,3,5,7的项,则将这些项删除。
如:
my_dict = {1:0, 3:1, 5:9, 7:16}
执行完毕后应为:
my_dict = {}
如:
my_dict = {1:7, 5:9, 0:20}
执行完毕后应为:
my_dict = {0:20}
如:
my_dict = {0:20, 2:40, 4:60}
执行完毕后应为:
my_dict = {0:20, 2:40, 4:60}
| input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
to_delete = [1,3,5,7]
for i in to_delete:
if i in my_dict:
del my_dict[i]
# 请不要更改此行以下的代码
print(my_dict) | 29,553 | todo | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
if '1' in my_dict:
del my_dict[1]
if '3' in my_dict:
del my_dict[3]
if '5' in my_dict:
del my_dict[5]
if '7' in my_dict:
del my_dict[7]
# 请不要更改此行以下的代码
print(my_dict) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:2;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"609";s:10:"questionid";s:3:"551";s:8:"testtype";s:1:"0";s:8:"... | 264,585 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
15,940 | 593 | 变量和赋值 3.5 | 3,018 | 按要求写出代码。
* 要求:
* 用户会输入两个数值,依次是猫的数量num_cats,一个是狗的数量num_dogs。
* 打印猫和狗总共的数量,并创建一个新的空行。
例1:
输入:1 2
输出:3
解释:1 + 2 = 3
例2:
输入:20 20
输出:40
解释:20 + 20 = 40
| total_animals = 0
num_cats = int(input())
num_dogs = int(input())
total_animals = num_cats + num_dogs
print(total_animals) | 42,841 | todo | a=input()
b=input()
print(a+b)
| O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:5;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:0;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2285";s:10:"questionid";s:4:"3018";s:8:"testtype";s:1:"0";s:8... | 192,174 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
26,253 | 458 | 字典LAB0.2 | 551 | 提供一个int字典my_dict,若其中含有key为1,3,5,7的项,则将这些项删除。
如:
my_dict = {1:0, 3:1, 5:9, 7:16}
执行完毕后应为:
my_dict = {}
如:
my_dict = {1:7, 5:9, 0:20}
执行完毕后应为:
my_dict = {0:20}
如:
my_dict = {0:20, 2:40, 4:60}
执行完毕后应为:
my_dict = {0:20, 2:40, 4:60}
| input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
to_delete = [1,3,5,7]
for i in to_delete:
if i in my_dict:
del my_dict[i]
# 请不要更改此行以下的代码
print(my_dict) | 72,200 | todo | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
my_dict={}
key=[1,3,5,7]
for key in my_dict:
del my_dict[key]
# 请不要更改此行以下的代码
print(my_dict) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:2;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"609";s:10:"questionid";s:3:"551";s:8:"testtype";s:1:"0";s:8:"... | 322,738 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
14,780 | 204 | 块&缩进 6.2 | 3,464 | 把下面的代码改成正确的缩进形式,补在题目中标明的位置。
1
2
3
4
5
6
7
if num_spiders > 10:
if num_cats > num_spiders:
print("猫会吃掉蜘蛛")
else:
print("猫吃不完蜘蛛")
else:
print('蜘蛛很少')
* 要求:
* 当num_spiders大于10时,如果num_cats大于num_spiders,则打印‘猫会吃掉蜘蛛’
* 当num_spiders大于10时,如果num_cats小于或等于num_spiders,则打印'猫吃不完蜘蛛'
* 当num_spiders小于或等于10时,打印'蜘蛛很少'。
例1:
输入... | num_spiders = int(input())
num_cats = int(input())
if num_spiders > 10:
if num_cats > num_spiders:
print("猫会吃掉蜘蛛")
else:
print("猫吃不完蜘蛛")
else:
print('蜘蛛很少') | 38,526 | todo | num_spiders = int(input())
num_cats = int(input())
if num_spiders > 10:
if num_cats > num_spiders:
print("猫会吃掉蜘蛛")
else:
print("猫吃不完蜘蛛")
else:
print('蜘蛛很少') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:81:"Sorry: IndentationError: expected an indented block (__tester__.python3, line 9)
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandbo... | 175,756 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block (__tester__.python3, line 9)
| IndentationError | IndentationError | IndentationError | error |
42,319 | 1,360 | 分支1.7 | 10,438 | 按要求写出代码。
* 要求:
* 把用户输入的一个值转换成int并存入变量num_spiders。
* 如果num_spiders不等于15,给变量web_size赋值为20;
* 否则,给变量web_size赋值为num_spiders。
* 最后,无论num_spiders是多少,都把web_size乘2。
* 打印web_size。
例1:
输入:15
输出:30
解释:num_spiders等于15,所以web_size被赋值为15。最后web_size乘2,所以web_size为30。
例2:
输入:17
输出:40
解释:num_spiders不等于15,所以web_size等于20。最后... | num_spiders = int(input())
if num_spiders != 15:
web_size = 20
else:
web_size = num_spiders
web_size = 2 * web_size
print(web_size) | 162,501 | complete | num_spiders=int(input())
if num_spiders!=15:
web_size=20
else :
web_size=num_spiders
web_size=web_size*2
print(web_size) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"5294";s:10:"questionid";s:5:"10438";s:8:"testtype";s:1:"0";s:... | 680,356 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
39,870 | 1,153 | 字典LAB0.2 | 551 | 提供一个int字典my_dict,若其中含有key为1,3,5,7的项,则将这些项删除。
如:
my_dict = {1:0, 3:1, 5:9, 7:16}
执行完毕后应为:
my_dict = {}
如:
my_dict = {1:7, 5:9, 0:20}
执行完毕后应为:
my_dict = {0:20}
如:
my_dict = {0:20, 2:40, 4:60}
执行完毕后应为:
my_dict = {0:20, 2:40, 4:60}
| input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
to_delete = [1,3,5,7]
for i in to_delete:
if i in my_dict:
del my_dict[i]
# 请不要更改此行以下的代码
print(my_dict) | 154,492 | todo | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
for i in my_dict:
if i==1:
del my_dict[i]
if i==3:
del my_dict[i]
if i==5:
del my_dict[i]
if i==7:
del my_dict[i]
else:
print("i" in my_dict)
# 在这里编写代码
# 请不要更改此行以下的代码
print(my_dict) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:82:"Sorry: IndentationError: expected an indented block (__tester__.python3, line 14)
";s:11:"maxpossmark";d:4;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandb... | 645,492 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block (__tester__.python3, line 14)
| IndentationError | IndentationError | IndentationError | error |
45,148 | 2,084 | 字典LAB0.2 | 551 | 提供一个int字典my_dict,若其中含有key为1,3,5,7的项,则将这些项删除。
如:
my_dict = {1:0, 3:1, 5:9, 7:16}
执行完毕后应为:
my_dict = {}
如:
my_dict = {1:7, 5:9, 0:20}
执行完毕后应为:
my_dict = {0:20}
如:
my_dict = {0:20, 2:40, 4:60}
执行完毕后应为:
my_dict = {0:20, 2:40, 4:60}
| input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
to_delete = [1,3,5,7]
for i in to_delete:
if i in my_dict:
del my_dict[i]
# 请不要更改此行以下的代码
print(my_dict) | 173,249 | complete | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
def remove_specific_keys(my_dict):
keys_to_remove =[1,3,5, 7]
for key in keys_to_remove:
if key in my_dict:
del my_dict[key]
remove_specific_keys(my_dict)
# 请不要更改此行以下的代码
print(my_dict) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:4;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"609";s:10:"questionid";s:3:"551";s:8:"testtype";s:1:"0";s:8:"... | 721,514 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
530 | 15 | 判断debug1 | 71 | 以下有一个函数convert_num, 若输入的内容大于10(包括10),则将其减去10。
代码中有错误,请改正其中的错误。
| param = int(input())
def convert_num(input_num):
if (input_num >= 10):
input_num = input_num - 10
print(input_num)
convert_num(param) | 682 | todo | param = int(input())
def convert_num(input_num):
if (input_num >= 10):
input_num = input_num - 10
print(input_num)
convert_num(param) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:3;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:2:"58";s:10:"questionid";s:2:"71";s:8:"testtype";s:1:"0";s:8:"te... | 2,766 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
8,205 | 260 | 输入和输出 1.8 | 2,920 | 按要求写出代码。
* 要求:
* 把用户输入的两个值转换成整数型,并分别存储。
* 打印这两个输入值的和。
例1:
输入:3 4
输出:7
解释:3 + 4 = 7
例2:
输入:9 10
输出:10
解释:9 + 10 = 19
| num1 = int(input())
num2 = int(input())
print (num1 + num2) | 17,292 | todo | x=int(input(3))
y=int(input(4))
c=x+y
print(c)
x1=int(input(9))
y1=int(input(10))
c1=x1+y1
print(c1) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2232";s:10:"questionid";s:4:"2920";s:8:"testtype";s:1:"0";s:8... | 89,457 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 5, in <module>
x1=int(input(9))
EOFError: EOF when reading a line
" | EOFError | No error | No error | EOFError | EOFError | error |
17,305 | 413 | LAB1.1 | 343 | 补全以下代码,使其打印x被y整除三次,并打印每次的结果。
如:
x = 9
y = 2
则输出:
4
2
1
| x = int(input())
y = int(input())
x = x // y
print(x)
x = x // y
print(x)
x = x // y
print(x) | 46,755 | todo | x = int(input())
y = int(input())
a=int(x/y)
b=a/y
c=b/y
print(a)
print(b)
print(c) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:2;s:10:"actualmark";d:0;s:11:"testresults";a:2:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"388";s:10:"questionid";s:3:"343";s:8:"testtype";s:1:"0";s:8:"... | 207,779 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
44,268 | 2,063 | 输入和输出 1.2 | 2,860 | 打印字符串:
I am Python!
| print("I am Python!") | 169,763 | complete | print('I am Python!') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:1;s:10:"actualmark";d:1;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2224";s:10:"questionid";s:4:"2860";s:8:"testtype";s:1:"0";s:8... | 709,536 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
39,786 | 932 | 字典LAB3 | 560 | 【(附加题)找出第一个重复的字符】
编写一个函数get_first_duplicate(input_str),找出一个String里第一次重复的字符:
例1:
输入: "abbcddeea"
输出: "a"
解释: a在第0位和最后一位, b在第1和第2位, d在第4和第5位, e在第6和第7位, 由于a是第一个出现并重复的字符, 因此返回a
例2:
输入: "abbcd"
输出: "b"
解释: b是唯一重复的, 因此返回b
例3:
输入: "abcd"
输出: ""
解释: 没有重复字符, 返回空字符
如果没有思路请看下面提示
此̶题̶的̶难̶点̶在̶于̶,̶不̶仅̶要̶找̶出̶重̶复̶的̶字̶符̶,̶还̶要... | input_str = input()
# 请不要更改此行以上的代码
def get_first_duplicate(input_str):
pos = len(input_str) + 1
res = ""
position = {}
for i in range(0, len(input_str)):
if input_str[i] in position:
if position[input_str[i]] < pos:
pos = i
res = input_str[i]
... | 154,269 | todo | input_str = input()
# 请不要更改此行以上的代码
#编写一个函数get_first_duplicate(input_str),
#用循环遍历input_string的每一位,
#则在position中添加一项key为该项,value为该项的index;
#如果存在,则将position字典中该字符对应的value跟pos比较,
#如果该value比较小,则将res替换成该字符,pos替换成postion
#内对应的value。cbaabc c:1,b:2,c:3
# 在这里编写代码
position = {}
pos = []
def get_first_duplica... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:7;s:10:"actualmark";d:6;s:11:"testresults";a:7:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"650";s:10:"questionid";s:3:"560";s:8:"testtype";s:1:"0";s:8:"... | 644,986 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
26,512 | 801 | 2.5 | 2,974 | 把下面代码中的语法错误改好,重新写出来。
print('I can")
print(swim.)
my_age = 10
print('my age:' my_age)
| print('I can')
print('swim.')
my_age = 10
print('my age:', my_age) | 73,651 | todo | print("I can")
print("swim.")
my_age = 10
print('my age:' my_age) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:115:" File "__tester__.python3", line 4
print('my age:' my_age)
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s... | 331,413 | 2 | 0 | No error | No error | File "__tester__.python3", line 4
print('my age:' my_age)
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
Dataset Card for PyMETA
Dataset Summary
PyMETA (Python Multi-Error TAxonomy) is a large-scale benchmark for hierarchical student code error classification. It contains 48,646 real Python code submissions from 579 users across 155 distinct problems (22 problem types), collected from the Circle Cat online learning platform. Every submission has a single-error label derived from Online Judge execution output, organized under a three-level hierarchical taxonomy (binary → three-class → 14 fine-grained error types grounded in Python's official exception hierarchy).
An expert-annotated multi-error diagnostic subset of 97 samples (13 error types) is provided in the GitHub repository for studying co-occurring errors.
Supported Tasks
- Task A — Binary classification:
No Errorvs.Error. - Task B — Three-class classification:
No Error/Logic Error/Explicit Error. - Task C — Multi-class classification: 14 fine-grained error types.
- Multi-error classification (on the 97-sample subset): identify all concurrent errors in a submission.
Languages
Student code is Python. Problem descriptions are primarily in Chinese (zh); the
evaluation prompts are in English (en).
How to use
from datasets import load_dataset
ds = load_dataset("CircleCat/pymeta")
print(ds["train"][0])
Dataset Structure
Data Fields
Each sample has 9 features plus a single-error label:
| Field | Type | Description |
|---|---|---|
userId |
string | Anonymized numeric identifier of the student |
name |
string | Problem/lesson name (problem type) |
questionId |
string | Unique identifier of the problem |
question |
string | Problem description |
exceptedAnswer |
string | A correct reference code solution |
attemptId |
string | Attempt number |
studentAnswer |
string | The student's submitted Python code |
testOutcome |
string | Online Judge error message / execution output |
attemptstepid |
string | Step identifier for the attempt |
error_category |
string | Single-error label (see taxonomy below) |
Taxonomy (label IDs)
0 No Error · 1 Logic Error · 2 Syntax Error · 3 Name Error · 4 Type Error ·
5 Indentation Error · 6 Unbound Local Error · 7 Key Error · 8 Index Error ·
9 EOF Error · 10 Recursion Error · 11 Value Error · 12 Tab Error ·
13 Other Errors. Full definitions and per-class counts are in the
GitHub TAXONOMY.md.
Data Splits
| Split | Examples |
|---|---|
| train | 39,402 |
| validation | 4,379 |
| test | 4,865 |
| total | 48,646 |
Source Data
Submissions were collected from historical logs of the Circle Cat online learning platform (a self-hosted Moodle instance with an integrated Online Judge). They were generated organically by learners of varying proficiency during ordinary coursework, so they provide a realistic and diverse distribution of student code errors.
Personal and Sensitive Information
The data were collected from pre-existing educational records under the platform's terms of use (which inform users that anonymized data may be used for educational and research purposes), with no recruitment or experimental intervention. All identifiers have been irreversibly anonymized; the dataset contains no personally identifiable information (PII) and no offensive content.
Licensing Information
Released under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.
Citation
@misc{li2026pymeta,
title = {PyMETA: A Benchmark Dataset for Hierarchical Student Code Error
Classification with Python-Interpreter-Based Labels},
author = {Li, Chuyue and Tang, Ziqi and Wang, Jingyi and Wu, Yu and
Hashimoto, Kazuma and Gao, Lingyu},
year = {2026},
howpublished = {\url{https://github.com/Circle-Cat/pymeta}},
note = {CircleCat}
}
- Downloads last month
- 30