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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,919 | 412 | 范围 3.7 | 3,284 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int,存入num_animals。
* 如果num_animals大于或等于30,给forest_size赋值为3。
* 否则,给forest_size赋值为1。
* 打印forest_size。
例1:
输入:30
输出:3
解释:30 = 30,所以size_forest被赋值为3。
例2:
输入:15
输出:1
解释:15不符合大于等于30的条件,所以size_forest被赋值为1。
| num_animals = int(input())
if num_animals >= 30:
forest_size = 3
else:
forest_size = 1
print(forest_size)
| 27,116 | complete | num_animals=int(input())
if num_animals>=30:
forest_size=3
else:
forest_size=1
print(forest_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:"2365";s:10:"questionid";s:4:"3284";s:8:"testtype";s:1:"0";s:8... | 124,924 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
19,547 | 481 | 输入和输出 1.11 | 2,928 | 按要求写出代码。
* 要求:
* 打印:
你好
我在吃饭
(注意最后有一个空行)
| print("你好")
print("我在吃饭") | 54,331 | complete | print("你好\n我在吃饭\n ") | 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:"2256";s:10:"questionid";s:4:"2928";s:8:"testtype";s:1:"0";s:8... | 237,904 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
33,114 | 171 | 判断2 | 367 | 定义一个函数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)) | 123,759 | todo | param = int(input())
# 在此补全代码
def get_age_status(param):
if 0 < param < 18:
print("未成年人")
if 18 < param < 65:
print("工作中")
else:
print("退休了")
get_age_status(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:"413";s:10:"questionid";s:3:"367";s:8:"testtype";s:1:"0";s:8:"... | 527,161 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
33,682 | 1,163 | LAB2.2 | 348 | 补全以下代码,判断该年份是否是闰年。
如果是闰年,则打印“是闰年”;
否则,打印“不是闰年”。
| i = int(input())
def is_leap_year(year):
if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0):
return "是闰年"
else:
return "不是闰年"
print(is_leap_year(i)) | 125,987 | todo | i = int(input())
def is_leap_year(i):
if i == 366:
return('是闰年')
else:
return('不是闰年')
print(is_leap_year(i)) | 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:"403";s:10:"questionid";s:3:"348";s:8:"testtype";s:1:"0";s:8:"... | 534,954 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
48,119 | 2,271 | 字典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
# 请不要... | 183,917 | complete | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
user_info = {}
def add_user(name,word):
user_info[name] = word
def verify_user(name,word):
if name in user_info and user_info[name] == word:
return 'True'
else:
return 'False'
# 在这里编写代码
# 请不要更改此行以下的代码
for ... | 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:"... | 764,483 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
26,750 | 723 | LAB2.2 | 348 | 补全以下代码,判断该年份是否是闰年。
如果是闰年,则打印“是闰年”;
否则,打印“不是闰年”。
| i = int(input())
def is_leap_year(year):
if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0):
return "是闰年"
else:
return "不是闰年"
print(is_leap_year(i)) | 74,909 | todo | i = int(input())
def is_leap_year(year):
if i % 4 == 0 and i % 100 != 0 or i%400 ==0:
return ("是闰年")
else:
return ("不是闰年")
print(is_leap_year(year)) | 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:"403";s:10:"questionid";s:3:"348";s:8:"testtype";s:1:"0";s:8:"... | 333,238 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 8, in <module>
print(is_leap_year(year))
NameError: name 'year' is not defined
" | NameError | No error | No error | NameError | NameError | error |
39,170 | 1,294 | LAB2.2 | 348 | 补全以下代码,判断该年份是否是闰年。
如果是闰年,则打印“是闰年”;
否则,打印“不是闰年”。
| i = int(input())
def is_leap_year(year):
if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0):
return "是闰年"
else:
return "不是闰年"
print(is_leap_year(i)) | 152,755 | todo | i = int(input())
def is_leap_year(a):
# 在这里补全代码
if a % 4 == 0 :
print("是闰年")
else:
print("不是闰年")
is_leap_year(i) | 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:4;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"403";s:10:"questionid";s:3:"348";s:8:"testtype";s:1:"0";s:8:"... | 637,251 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
41,414 | 349 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 160,262 | todo | print('input()') | 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:"2263";s:10:"questionid";s:4:"2931";s:8:"testtype";s:1:"0";s:8... | 672,239 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
38,378 | 882 | 定义变量 | 325 | 定义一个叫做 num_students 的变量,并将它的值设置为100. | num_students = 100
print(num_students) | 150,115 | complete | num_students = 100
print(num_students) | 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:3:"369";s:10:"questionid";s:3:"325";s:8:"testtype";s:1:"0";s:8:"... | 625,872 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,132 | 936 | 列表3.2 | 474 | 请编写一个函数count_negative(),传入一个列表参数my_list,其中的值都是格式为string的整数,返回该列表里负数的个数。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果。
| temp_list = input().split(',')
# 请不要更改此行以上的代码
def count_negative(my_list):
count = 0
for i in my_list:
if int(i) < 0:
count += 1
return count
# 请不要更改此行以下的代码
print(count_negative(temp_list)) | 136,532 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def count_negative(temp_list):
for i in temp_list:
i = int (i)
count = 0
while i < 0:
count += 1
return count
# 请不要更改此行以下的代码
print(count_negative(temp_list)) | 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:"501";s:10:"questionid";s:3:"474";s:8:"testtype";s:1:"0";s:8:"... | 577,148 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
17,773 | 650 | 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)) | 48,849 | complete | 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<z and y<x:
return(y)
elif z<y and z<x:
return(z)
else:
return()
print(smallest_among_three(x, y, z)) | 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:"395";s:10:"questionid";s:3:"346";s:8:"testtype";s:1:"0";s:8:"... | 226,651 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
30,620 | 977 | 判断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) | 106,161 | complete | param = int(input())
def convert_num(input_num):
if (input_num >= 10):
input_num = input_num - 10
print(input_num)
else:
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: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:"418";s:10:"questionid";s:3:"368";s:8:"testtype";s:1:"0";s:8:"... | 451,970 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
47,205 | 2,183 | 判断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) | 181,531 | todo | input_num = int(input())
def convert_num(input_num):
if (input_num >= 10):
return input_num - 10
else:
return input_num
result = convert_num(input_num)
print(result) | 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:3:"418";s:10:"questionid";s:3:"368";s:8:"testtype";s:1:"0";s:8:"... | 752,416 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
13,483 | 429 | 输入和输出 1.11 | 2,928 | 按要求写出代码。
* 要求:
* 打印:
你好
我在吃饭
(注意最后有一个空行)
| print("你好")
print("我在吃饭") | 34,927 | complete | print('你好\n我在吃饭\n') | 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:"2256";s:10:"questionid";s:4:"2928";s:8:"testtype";s:1:"0";s:8... | 158,697 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
9,749 | 390 | LAB2.2 | 348 | 补全以下代码,判断该年份是否是闰年。
如果是闰年,则打印“是闰年”;
否则,打印“不是闰年”。
| i = int(input())
def is_leap_year(year):
if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0):
return "是闰年"
else:
return "不是闰年"
print(is_leap_year(i)) | 23,065 | complete | i = int(input())
def is_leap_year(year):
# 在这里补全代码
if year % 400 ==0:
return "是闰年"
return "不是闰年"
print(is_leap_year(i)) | 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:4;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"403";s:10:"questionid";s:3:"348";s:8:"testtype";s:1:"0";s:8:"... | 107,985 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
41,741 | 1,339 | 循环LAB4 | 400 | 请编写一个函数is_palindrome,判断输入的字符串是否是回文(什么是回文?)
例如:
输入:CircleCat
返回:False
输入: TAT
返回:True
输入:A
返回:True
| param = input()
def is_palindrome(s):
return s == s[::-1]
print(is_palindrome(param)) | 161,157 | todo | param = input()
# 在此处编写代码
def is_palindrome(x):
i = param[::-1]
if i == param:
print('True')
else:
print('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: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:"468";s:10:"questionid";s:3:"400";s:8:"testtype";s:1:"0";s:8:"... | 678,458 | 1 | 8 | No error | No error | No error | No error | No error | LogicError | error |
23,654 | 160 | 判断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) | 65,311 | complete | param = int(input())
def convert_num(input_num):
if input_num >= 10:
input_num = input_num - 10
print(input_num)
# else:
# 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: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:"418";s:10:"questionid";s:3:"368";s:8:"testtype";s:1:"0";s:8:"... | 311,817 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
2,902 | 44 | 列表LAB0.1 | 248 | 请写一个函数get_min_plus_max(),传入一个列表参数my_list; 其中都是int。
返回列表中的最大值 + 最小值。
例1:
my_list = [-5, 1, 0]
最小值-5,最大值1, 返回 -4
例2:
my_list = [4, 2, 2, -7, 4, -5, 7, 2, -3, -6]
最小值-7,最大值7, 返回 0
请不要使用任何列表自带函数,也不要创建一个新的列表.
| import ast
input_list = ast.literal_eval(input())
# 请不要更改此行以上的代码
def get_min_plus_max(my_list):
min_num = my_list[0]
max_num = my_list[0]
for i in my_list:
min_num = min(i, min_num)
max_num = max(i, max_num)
return min_num + max_num
# 请不要更改此行以下的代码
print(get_min_plus_max(in... | 5,305 | complete | import ast
input_list = ast.literal_eval(input())
def get_min_plus_max(list):
list == list.sort()
return list[0] + list[len(list) - 1]
print(get_min_plus_max(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: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:"220";s:10:"questionid";s:3:"248";s:8:"testtype";s:1:"0";s:8:"... | 30,959 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,257 | 42 | 字典LAB1 | 256 | 【用户名密码验证】
编写一个程序做到添加/验证用户名密码,包含两个函数:
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... | 6,896 | todo | 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 pass_word == user_info:
return True
else:
... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:3;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:3;s:10:"actualmark";d:0;s:11:"testresults";a:3:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"258";s:10:"questionid";s:3:"256";s:8:"testtype";s:1:"0";s:8:"... | 37,473 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
14,352 | 428 | LAB1.0 | 342 | 补全以下代码,使其打印x被y除三次,并打印每次的结果。
如:
x = 8
y = 2
则输出:
4.0
2.0
1.0
| x = int(input())
y = int(input())
x /= y
print(x)
x /= y
print(x)
x /= y
print(x) | 37,494 | complete | x = int(input())
y = int(input())
print(x/y)
x=x/y
print(x/y)
x=x/y
print(x/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: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:"385";s:10:"questionid";s:3:"342";s:8:"testtype";s:1:"0";s:8:"... | 169,815 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
22,155 | 769 | 列表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)) | 61,519 | 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:"... | 269,000 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
38,670 | 1,134 | LAB2.2 | 348 | 补全以下代码,判断该年份是否是闰年。
如果是闰年,则打印“是闰年”;
否则,打印“不是闰年”。
| i = int(input())
def is_leap_year(year):
if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0):
return "是闰年"
else:
return "不是闰年"
print(is_leap_year(i)) | 151,355 | complete | i = int(input())
def is_leap_year(year):
if i%100!=0:
if i%4==0 and i%100!=0:
return('是闰年')
else:
return('不是闰年')
else:
if i%400==0 and i%3200!=0:
return('是闰年')
else:
return('不是闰年')
print(is_leap_year(i)... | 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:"403";s:10:"questionid";s:3:"348";s:8:"testtype";s:1:"0";s:8:"... | 631,026 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
19,313 | 590 | 输入和输出 1.2 | 2,860 | 打印字符串:
I am Python!
| print("I am Python!") | 53,570 | 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... | 234,632 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
40,326 | 1,294 | 列表4.2 | 501 | 请写一个函数sum_of_matrix(),传入一个列表参数my_list,其中有n个长度为m的列表,其中都是格式为string的整数,返回它们的和。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果。
| line_list = input().split(';')
temp_list = []
for i in line_list:
temp_list.append(i.split(','))
# 请不要更改此行以上的代码
# 在这里编写代码
def sum_of_matrix(my_list):
ret = 0
for i in my_list:
for j in i:
ret += int(j)
return ret
# 请不要更改此行以下的代码
print(sum_of_matrix(temp_list)) | 155,893 | todo | line_list = input().split(';')
temp_list = []
for i in line_list:
temp_list.append(i.split(','))
# 请不要更改此行以上的代码
# 在这里编写代码
def sum_of_matrix(my_list):
sum_list = []
for j in temp_list:
for k in j:
k+=k
sum_list.append(k)
# print(k)
return k
# 请不要更改此行以... | 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:"534";s:10:"questionid";s:3:"501";s:8:"testtype";s:1:"0";s:8:"... | 671,949 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
5,883 | 259 | 判断1 | 366 | 补全代码,定义一个函数get_discount(),如果用户的身高小于140(不含),返回票价0,否则返回票价100。
| param = int(input())
def get_discount(height):
if (height < 140):
return 0
else:
return 100
print(get_discount(param)) | 11,512 | todo | param = int(input())
def get_discount()
if (param<140)
0
else 100
# 在此处补全代码
print(get_discount(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:111:" File "__tester__.python3", line 2
def get_discount()
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:... | 58,864 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
def get_discount()
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
35,834 | 1,210 | 递归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)) | 140,041 | 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(fib_3(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: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:"... | 589,731 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
3,713 | 31 | 列表4.2 | 244 | 请写一个函数sum_of_matrix(),传入一个列表参数my_list,其中有n个长度为m的列表,其中都是格式为string的整数,返回它们的和。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果。
| line_list = input().split(';')
temp_list = []
for i in line_list:
temp_list.append(i.split(','))
# 请不要更改此行以上的代码
# 在这里编写代码
def sum_of_matrix(my_list):
ret = 0
for i in my_list:
for j in i:
ret += int(j)
return ret
# 请不要更改此行以下的代码
print(sum_of_matrix(temp_list)) | 6,467 | todo | line_list = input().split(';')
temp_list = []
for i in line_list:
temp_list.append(i.split(','))
# 请不要更改此行以上的代码
# 在这里编写代码
#定义函数,传入参数列表
#确认行
#确认列
def sum_of_matrix(my_list):
sum = 0
for i in range(0,len(my_list)):
for j in range(0, len(my_list[i])):
sum += my_li... | 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:"195";s:10:"questionid";s:3:"244";s:8:"testtype";s:1:"0";s:8:"... | 32,468 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 22, in <module>
print(sum_of_matrix(temp_list))
File "__tester__.python3", line 15, in sum_of_matrix
sum += my_list[i][j]
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
" | TypeError | No error | No error | TypeError | TypeError | error |
21,955 | 769 | 列表3.3 | 476 | 请编写一个函数palindrome(),传入一个列表参数my_list,其中的值都是长度为1的string,返回一个boolean,判断在去掉最后一位和第一位后,该列表是否是回文。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果(可以更改原列表的内容)。
| temp_list = input().split(',')
# 请不要更改此行以上的代码
def palindrome(my_list):
my_list.pop()
my_list.remove(my_list[0])
return my_list == my_list[::-1]
# 请不要更改此行以下的代码
print(palindrome(temp_list)) | 61,130 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
def palindrome(temp_list):
del temp_list[0]
temp_list.pop()
for i in temp_list:
if len(temp_list)==0:
return(True)
elif temp_list==temp_list[::-1]:
return(True)
else:
return(False)
... | 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 8)
";s:11:"maxpossmark";d:8;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandbo... | 267,410 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block (__tester__.python3, line 8)
| IndentationError | IndentationError | IndentationError | error |
35,180 | 1,168 | 分支 1.5 | 3,477 | 按要求写出代码。
* 要求:
* 把用户的输入转换成int存入变量user_age。
* 如果user_age == 18,给num_candles赋值为18。
* 否则,给num_candles赋值为3。
* 打印num_candles。
| user_age = int(input())
if user_age == 18:
num_candles = 18
else:
num_candles = 3
print(num_candles) | 136,790 | todo | def user_age(x):
if user_age == 18:
print("num_candles=18")
els:print("num_candles=3")
| 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:"2425";s:10:"questionid";s:4:"3477";s:8:"testtype";s:1:"0";s:8... | 579,159 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
33,730 | 1,119 | 循环2.3 | 391 | 请完成以下代码,使其打印
1
2
3
5
6
7
(跳过4)
| for i in range(1,8):
if (i == 4):
continue
print(i) | 126,141 | complete | for i in range(1,8):
if i==4:
continue
print(i) | 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:3:"434";s:10:"questionid";s:3:"391";s:8:"testtype";s:1:"0";s:8:"... | 535,094 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
18,123 | 153 | 判断2 | 367 | 定义一个函数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)) | 50,254 | complete | param = int(input())
# 在此补全代码
def get_age_status(param):
if 0<param<18:
return "未成年人"
elif 18<=param<65:
return "工作中"
else:
return "退休了"
print(get_age_status(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:3:"413";s:10:"questionid";s:3:"367";s:8:"testtype";s:1:"0";s:8:"... | 222,705 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,651 | 90 | 递归2.2 | 312 | 设计一个函数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)) | 7,366 | 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:"334";s:10:"questionid";s:3:"312";s:8:"testtype";s:1:"0";s:8:"... | 41,906 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
35,919 | 1,181 | 判断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) | 140,707 | complete | param = int(input())
def convert_num(param):
if param >= 10:
return param-10
else:
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: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:"418";s:10:"questionid";s:3:"368";s:8:"testtype";s:1:"0";s:8:"... | 593,348 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
30,344 | 306 | 递归1.2 | 572 | 补全代码,使其打印出还有几天到周日。
例如输入3,则打印
还有4天到周日
还有3天到周日
还有2天到周日
还有1天到周日
到周日了!
| input_int = int(input())
# 请不要更改此行以上的代码
def days_left_to_sunday(day):
if day < 7:
print("还有" + str(7 - day) + "天到周日")
days_left_to_sunday(day + 1)
else:
print("到周日了!")
# 请不要更改此行以下的代码
days_left_to_sunday(input_int) | 103,467 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def days_left_to_sunday(day):
if day < 7:
print("还有" + str(7 - day) + "天到周日")
#在这里添加一行代码
days_left_to_sunday(input_int-1)
else:
print("到周日了!")
# 请不要更改此行以下的代码
days_left_to_sunday(input_int) | 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:3;s:10:"actualmark";d:1;s:11:"testresults";a:2:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"663";s:10:"questionid";s:3:"572";s:8:"testtype";s:1:"0";s:8:"... | 441,868 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 13, in <module>
days_left_to_sunday(input_int)
File "__tester__.python3", line 8, in days_left_to_sunday
days_left_to_sunday(input_int-1)
File "__tester__.python3", line 8, in days_left_to_sunday
days_left_to_sunday(input_i... | RecursionError | No error | No error | RecursionError | RecursionError | error |
46,169 | 2,154 | LAB1.2 | 6,216 | 运动中消耗的卡路里是
(年龄的0.2757倍 体重的0.03295倍 心率的1.0781倍 )的和
减去75.4991后,得到的结果乘以时间,再除以 8.368。
补全下列代码,给定了年龄,体重,心率,时间,计算出卡路里的消耗量
| age = int(input())
weight = int(input())
heart_rate = int(input())
time = int(int(input()))
calories_burned = ((age * 0.2757) + (weight * 0.03295) + (heart_rate * 1.0781) - 75.4991) * time / 8.368
print(calories_burned) | 178,324 | complete | age = int(input())
weight = int(input())
heart_rate = int(input())
time = int(int(input()))
def calculate_calories(age, weight, heart_rate, time):
# 计算基础部分:年龄、体重和心率的贡献
calorie_burn = (age * 0.2757) + (weight * 0.03295) + (heart_rate * 1.0781)
# 减去75.4991
calorie_burn -= 75.4991 ... | 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:2;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"3178";s:10:"questionid";s:4:"6216";s:8:"testtype";s:1:"0";s:8... | 741,437 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 21, in <module>
print(f" {calories}")
NameError: name 'calories' is not defined
" | NameError | No error | No error | NameError | NameError | error |
17,804 | 572 | 字典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
# 请不要... | 48,963 | todo | 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):
print(user_info)
if user_name in user_info:
if(user_info[user_name] == password):
... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:3;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:3;s:10:"actualmark";d:0;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:"... | 217,423 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
826 | 32 | 循环1.7 | 85 | 编写一个函数double_until_one_thousand, 将其打印出来后,乘二,直至其大于1000。
| param = int(input())
def double_until_one_thousand(num):
while(num <= 1000):
print(num)
num *= 2
double_until_one_thousand(param) | 1,126 | todo | param = int(input())
# 在此处补全代码
def double_until_one_thousand(param):
while(param<=100):
param=param*2
double_until_one_thousand(param) | 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:2:"71";s:10:"questionid";s:2:"85";s:8:"testtype";s:1:"0";s:8:"te... | 4,803 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
21,997 | 596 | 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) | 61,229 | 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: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:"2279";s:10:"questionid";s:4:"2974";s:8:"testtype";s:1:"0";s:8... | 297,962 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 4, in <module>
print('my age:' + my_age)
TypeError: can only concatenate str (not "int") to str
" | TypeError | No error | No error | TypeError | TypeError | error |
19,882 | 718 | 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) | 55,534 | complete | x = int(input())
y = int(input())
a=float(x/y)
b=float(a/y)
c=float(b/y)
a=int(a)
b=int(b)
c=int(c)
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: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:"388";s:10:"questionid";s:3:"343";s:8:"testtype";s:1:"0";s:8:"... | 244,715 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
37,627 | 807 | 加法 | 326 | 写一行代码,将 功德 (karma) 加一。
如:
karma = 5
则输出
6
| karma = int(input())
karma = karma + 1
print(karma) | 147,952 | todo | karma = int(input())
# 在这里填写代码
karma=5
karma=karma+1
print(karma) | 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:3:"370";s:10:"questionid";s:3:"326";s:8:"testtype";s:1:"0";s:8:"... | 628,075 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
3,730 | 44 | 循环3.2 | 93 | 打印出输入字符串的长度。
如:
输入:CircleCat
打印:9
| param = input()
print(len(param)) | 6,528 | complete | param = input()
count = 0
for i in param:
count = count + 1
if count == len(param):
print(count) | 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:2:"86";s:10:"questionid";s:2:"93";s:8:"testtype";s:1:"0";s:8:"te... | 32,839 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
44,054 | 1,450 | 函数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() | 169,052 | todo | # 在这里编写代码
def welcome_to_circle_cat()
print("welcome to circle cat!")
# 请不要更改此行以下的代码
welcome_to_circle_cat() | 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:127:" File "__tester__.python3", line 2
def welcome_to_circle_cat()
^
SyntaxError: expected ':'
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresu... | 707,086 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
def welcome_to_circle_cat()
^
SyntaxError: expected ':'
| SyntaxError | SyntaxError | SyntaxError | error |
24,130 | 817 | LAB1.0 | 342 | 补全以下代码,使其打印x被y除三次,并打印每次的结果。
如:
x = 8
y = 2
则输出:
4.0
2.0
1.0
| x = int(input())
y = int(input())
x /= y
print(x)
x /= y
print(x)
x /= y
print(x) | 66,304 | complete | x = int(input())
y = int(input())
num_1 = x / y
num_2 = x / y / y
num_3 = x / y / y / y
print(num_1)
print(num_2)
print(num_3) | 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:"385";s:10:"questionid";s:3:"342";s:8:"testtype";s:1:"0";s:8:"... | 291,398 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
32,997 | 916 | 范围 3.14 | 3,369 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int,存入cat_age。
* 如果cat_age大于或等于1,并且小于或等于10,打印'可以上飞机';
* 否则,打印'不能上飞机'。
例1:
输入:3
输出:可以上飞机
解释:1 < 3 < 10,所以打印'可以上飞机'。
例2:
输入:12
输出:不能上飞机
解释:12 > 10,所以打印'不能上飞机'。
| cat_age = int(input())
if (1 <= cat_age <= 10):
print('可以上飞机')
else:
print('不能上飞机') | 123,251 | todo | cat_age = int(input())
if (cat_age >=1) and (cat_age<10):
print('可以上飞机')
else: 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:4;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2390";s:10:"questionid";s:4:"3369";s:8:"testtype";s:1:"0";s:8... | 525,536 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
26,375 | 841 | LAB1.0 | 342 | 补全以下代码,使其打印x被y除三次,并打印每次的结果。
如:
x = 8
y = 2
则输出:
4.0
2.0
1.0
| x = int(input())
y = int(input())
x /= y
print(x)
x /= y
print(x)
x /= y
print(x) | 72,984 | complete | x = int(input())
y = int(input())
print(x/y)
print(x/y**2)
print(x/y**3) | 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:"385";s:10:"questionid";s:3:"342";s:8:"testtype";s:1:"0";s:8:"... | 323,994 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
23,087 | 604 | 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)) | 63,289 | todo | x = int(input())
y = int(input())
z = int(input())
def smallest_among_three=(x,y,z):
if (x<y<z):
return(x)
elif(x<z<y):
return(x)
elif(y<x<z):
return(y)
elif(y<z<x):
return(y)
else:
return(z)
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:133:" File "__tester__.python3", line 4
def smallest_among_three=(x,y,z):
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:3;s:10:"actualmark";i:0;s:11:"te... | 355,267 | 2 | 0 | No error | No error | File "__tester__.python3", line 4
def smallest_among_three=(x,y,z):
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
38,757 | 882 | 分支 1.5 | 3,477 | 按要求写出代码。
* 要求:
* 把用户的输入转换成int存入变量user_age。
* 如果user_age == 18,给num_candles赋值为18。
* 否则,给num_candles赋值为3。
* 打印num_candles。
| user_age = int(input())
if user_age == 18:
num_candles = 18
else:
num_candles = 3
print(num_candles) | 151,669 | todo | def user_age(int(input(''))):
if user_age == 18:
num_candles = 18
else:
num_candles =3
print(num_candles) | 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 1
def user_age(int(input(''))):
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a... | 633,534 | 2 | 0 | No error | No error | File "__tester__.python3", line 1
def user_age(int(input(''))):
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
41,655 | 1,350 | 循环3.2 | 394 | 打印出输入字符串的长度。
如:
输入:CircleCat
打印:9
| param = input()
print(len(param)) | 161,090 | complete | param = input()
# 在此处补全代码
c=0
while c <len(param):
c +=1
print(c) | 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:"... | 674,705 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
21,356 | 769 | 循环2.3 | 388 | 补全以下代码,使其打印0到5的所有值。
| for i in range(0, 10):
print(i)
if (i == 5):
break | 59,818 | todo | for i in range(0, 10):
print(i)
# 在这里补全代码
if(i>5):
break
| 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 5)
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandbo... | 260,163 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block (__tester__.python3, line 5)
| IndentationError | IndentationError | IndentationError | error |
23,804 | 613 | 列表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... | 65,597 | todo | input_list = input().split(',')
num_1 = int(input())
num_2 = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def replace_element_in_list(input_list , num_from , num_to):
i = 0
for i in range( len(input_list) ):
if input_list[i] == num_from :
input_list[i] = num_to
i += 1
retur... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:3;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:1;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:"... | 293,163 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
14,202 | 448 | 列表3.2 | 474 | 请编写一个函数count_negative(),传入一个列表参数my_list,其中的值都是格式为string的整数,返回该列表里负数的个数。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果。
| temp_list = input().split(',')
# 请不要更改此行以上的代码
def count_negative(my_list):
count = 0
for i in my_list:
if int(i) < 0:
count += 1
return count
# 请不要更改此行以下的代码
print(count_negative(temp_list)) | 37,195 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def count_negative(temp_list):
for n in temp_list:
n=int(n)
a=0
if n > 0:
continue
a=0+1
return a
# 请不要更改此行以下的代码
print(count_negative(temp_list)) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:3;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:2;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"501";s:10:"questionid";s:3:"474";s:8:"testtype";s:1:"0";s:8:"... | 184,679 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
16,267 | 450 | 分支 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) | 43,686 | complete | num_spiders = int(input())
web_size = 1
if num_spiders == 10:
web_size = web_size*2
else:
web_size = web_size*3
num_spiders = num_spiders + 5
print(num_spiders , 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:"2315";s:10:"questionid";s:4:"3126";s:8:"testtype";s:1:"0";s:8... | 200,233 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,690 | 1,210 | 循环2.3 | 388 | 补全以下代码,使其打印0到5的所有值。
| for i in range(0, 10):
print(i)
if (i == 5):
break | 139,651 | complete | for i in range(0, 6):
print(i)
i+=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:1;s:10:"actualmark";d:1;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"431";s:10:"questionid";s:3:"388";s:8:"testtype";s:1:"0";s:8:"... | 587,347 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
12,828 | 271 | 列表LAB0.2 | 548 | 请写一个函数multiply_lists(),传入一个列表参数my_list, 和一个int参数factor。
将my_list扩张到factor倍,并返回。
例如:
my_list = [1, 2]
factor = 3
返回 [1, 2, 1, 2, 1, 2]
请不要使用任何列表自带函数。
| import ast
input_list = ast.literal_eval(input())
input_int = int(input())
# 请不要更改此行以上的代码
def multiply_lists(my_list, factor):
return my_list * factor
# 请不要更改此行以下的代码
print(multiply_lists(input_list, input_int)) | 33,336 | complete | import ast
input_list = ast.literal_eval(input())
input_int = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def multiply_lists(input_list, input_int):
result=[]
for i in range(0, input_int):
result=result+input_list
return result
# 请不要更改此行以下的代码
print(multiply_lists(input_list, 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:"594";s:10:"questionid";s:3:"548";s:8:"testtype";s:1:"0";s:8:"... | 151,323 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
13,237 | 418 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 34,450 | complete | print(input()) | 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... | 726,300 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
39,425 | 414 | 判断2 | 367 | 定义一个函数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)) | 153,624 | complete | param = int(input())
def get_age_status(param):
if 0 < param < 18:
return "未成年人"
elif 18 <= param <65:
return "工作中"
else:
return "退休了"
print(get_age_status(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:3:"413";s:10:"questionid";s:3:"367";s:8:"testtype";s:1:"0";s:8:"... | 641,043 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
34,670 | 171 | 列表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
# 请不要更改此行以... | 131,135 | complete | import ast
input_list_1 = ast.literal_eval(input())
input_list_2 = ast.literal_eval(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def add_matrix(input_list_1, input_list_2):
my_list = input_list_1
for i in range(len(input_list_1)):
for j in range(len(input_list_1[i])):
my_list[i][j] = input_list_1[i][j] + input_l... | 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:"565";s:10:"questionid";s:3:"544";s:8:"testtype";s:1:"0";s:8:"... | 552,335 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
46,299 | 2,203 | 输入和输出 1.8 | 3,474 | 按要求写出代码。
* 要求:
* 把用户输入的两个值转换成整数型,并分别存储。
* 打印这两个输入值的和。
例1:
输入:3 4
输出:7
解释:3 + 4 = 7
例2:
输入:9 10
输出:19
解释:9 + 10 = 19
| num1 = int(input())
num2 = int(input())
print (num1 + num2) | 178,795 | complete | num1=int(input())
num2=int(input())
num3=num1+num2
print(num3) | 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:"2410";s:10:"questionid";s:4:"3474";s:8:"testtype";s:1:"0";s:8... | 765,601 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
20,779 | 724 | LAB2.2 | 348 | 补全以下代码,判断该年份是否是闰年。
如果是闰年,则打印“是闰年”;
否则,打印“不是闰年”。
| i = int(input())
def is_leap_year(year):
if ((year % 4 == 0 and year % 100 != 0) or year % 400 == 0):
return "是闰年"
else:
return "不是闰年"
print(is_leap_year(i)) | 58,532 | complete | i = int(input())
def is_leap_year(i):
# 在这里补全代码
if (i%4==0) and (i%100 != 0) or (i%400)==0:
return "是闰年"
else:
return "不是闰年"
print(is_leap_year(i)) | 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:"403";s:10:"questionid";s:3:"348";s:8:"testtype";s:1:"0";s:8:"... | 254,614 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
9,167 | 182 | 函数1.0 | 2,824 | 定义一个叫做 WELCOME_TO_CIRCLE_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() | 21,302 | todo | def welcome_to_cirlcle_cat():
print("Welcome to circle cat!")
welcome_to_cirlcle_cat():
welcome_to_cirlcle_cat():
welcome_to_cirlcle_cat(): | 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:125:" File "__tester__.python3", line 3
welcome_to_cirlcle_cat():
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresult... | 101,653 | 2 | 0 | No error | No error | File "__tester__.python3", line 3
welcome_to_cirlcle_cat():
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
18,270 | 408 | 列表3.2 | 474 | 请编写一个函数count_negative(),传入一个列表参数my_list,其中的值都是格式为string的整数,返回该列表里负数的个数。
请不要使用任何列表自带函数,也不要创建一个新的列表来储存结果。
| temp_list = input().split(',')
# 请不要更改此行以上的代码
def count_negative(my_list):
count = 0
for i in my_list:
if int(i) < 0:
count += 1
return count
# 请不要更改此行以下的代码
print(count_negative(temp_list)) | 50,730 | complete | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def count_negative(a):
n=0
for num in temp_list:
num=int(num)
if(num<0):
n+=1
return(n)
# 请不要更改此行以下的代码
print(count_negative(temp_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: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:"501";s:10:"questionid";s:3:"474";s:8:"testtype";s:1:"0";s:8:"... | 299,000 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
11,045 | 359 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 27,523 | todo | print("请输入一个值")
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: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:"2263";s:10:"questionid";s:4:"2931";s:8:"testtype";s:1:"0";s:8... | 143,399 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
47,480 | 2,313 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 182,225 | todo | str=input('')
print('',str)
prin('') | 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:"2263";s:10:"questionid";s:4:"2931";s:8:"testtype";s:1:"0";s:8... | 755,997 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 3, in <module>
prin('')
NameError: name 'prin' is not defined. Did you mean: 'print'?
" | NameError | No error | No error | NameError | NameError | error |
33,330 | 1,119 | 判断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) | 124,904 | 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:3:"418";s:10:"questionid";s:3:"368";s:8:"testtype";s:1:"0";s:8:"... | 530,511 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
23,602 | 642 | 判断debug2 | 369 | 以下有一个函数print_num, 若输入的内容等于10,则将其打印出来,否则什么也不做。
代码中有错误,请改正其中的错误。
| param = int(input())
def print_num(input_num):
if (input_num == 10):
print(input_num)
print_num(param) | 65,230 | todo | def print_num(input_num):
if input_num = 10 :
print(input_num)
param = int(input())
print(print_num(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:108:" File "__tester__.python3", line 2
if input_num = 10 :
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:3;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"so... | 286,705 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
if input_num = 10 :
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
38,026 | 932 | 列表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)) | 148,677 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def get_max(temp_list):
max_number = temp_list[0]
for i in range(1,len(temp_list)):
if temp_list[i]> max_number:
max_number = temp_list[]
print(max_number)
# 请不要更改此行以下的代码
print(get_max(temp_list... | 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:123:" File "__tester__.python3", line 9
max_number = temp_list[]
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:4;s:10:"actualmark";i:0;s:11:"testresults"... | 635,657 | 2 | 0 | No error | No error | File "__tester__.python3", line 9
max_number = temp_list[]
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
24,756 | 829 | 输入和输出 1.11 | 2,928 | 按要求写出代码。
* 要求:
* 打印:
你好
我在吃饭
(注意最后有一个空行)
| print("你好")
print("我在吃饭") | 67,926 | complete | 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:"2256";s:10:"questionid";s:4:"2928";s:8:"testtype";s:1:"0";s:8... | 300,604 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
27,579 | 815 | 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)) | 79,188 | 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
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:81:"Sorry: IndentationError: expected an indented block (__tester__.python3, line 6)
";s:11:"maxpossmark";d:3;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandbo... | 354,070 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block (__tester__.python3, line 6)
| IndentationError | IndentationError | IndentationError | error |
23,632 | 755 | 列表LAB0.1 | 546 | 请写一个函数get_min_plus_max(),传入一个列表参数my_list; 其中都是int。
返回列表中的最大值 + 最小值。
例1:
my_list = [-5, 1, 0]
最小值-5,最大值1, 返回 -4
例2:
my_list = [4, 2, 2, -7, 4, -5, 7, 2, -3, -6]
最小值-7,最大值7, 返回 0
请不要使用任何列表自带函数,也不要创建一个新的列表.
| import ast
input_list = ast.literal_eval(input())
# 请不要更改此行以上的代码
def get_min_plus_max(my_list):
min_num = my_list[0]
max_num = my_list[0]
for i in my_list:
min_num = min(i, min_num)
max_num = max(i, max_num)
return min_num + max_num
# 请不要更改此行以下的代码
print(get_min_plus_max(input_list)) | 65,286 | complete | import ast
input_list = ast.literal_eval(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def get_min_plus_max(my_list):
max_value = min_value =None
for num in my_list:
if (max_value is None or num > max_value):
max_value = num
if (min_value is None or num < min_value):
min_... | 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:"581";s:10:"questionid";s:3:"546";s:8:"testtype";s:1:"0";s:8:"... | 285,564 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
8,148 | 226 | 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) | 17,046 | todo | print("I can")
print("swim")
my_age = 10
print('my age:' + str(my_age)) | 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:"2279";s:10:"questionid";s:4:"2974";s:8:"testtype";s:1:"0";s:8... | 88,601 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
24,839 | 470 | 递归1.2 | 572 | 补全代码,使其打印出还有几天到周日。
例如输入3,则打印
还有4天到周日
还有3天到周日
还有2天到周日
还有1天到周日
到周日了!
| input_int = int(input())
# 请不要更改此行以上的代码
def days_left_to_sunday(day):
if day < 7:
print("还有" + str(7 - day) + "天到周日")
days_left_to_sunday(day + 1)
else:
print("到周日了!")
# 请不要更改此行以下的代码
days_left_to_sunday(input_int) | 68,196 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def days_left_to_sunday(day):
if day < 7:
print("还有" + str(7 - day) + "天到周日")
day=day+1
#在这里添加一行代码
else:
print("到周日了!")
# 请不要更改此行以下的代码
days_left_to_sunday(input_int) | 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:"663";s:10:"questionid";s:3:"572";s:8:"testtype";s:1:"0";s:8:"... | 319,647 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
39,135 | 1,286 | 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)) | 152,634 | todo | x = int(input())
y = int(input())
z = int(input())
# 在这里补全代码
def smallest_among_three():
if (x < y < z) or (x < z < y):
return x
elif (y < x < z) or (y < z < x):
return y
else:
return z
print(smallest_among_three(x, y, z)) | 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:3;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"395";s:10:"questionid";s:3:"346";s:8:"testtype";s:1:"0";s:8:"... | 636,310 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 13, in <module>
print(smallest_among_three(x, y, z))
TypeError: smallest_among_three() takes 0 positional arguments but 3 were given
" | TypeError | No error | No error | TypeError | TypeError | error |
3,002 | 79 | 列表LAB0.3 | 250 | 请写一个函数create_matrix(),传入3个int参数r,c,val。
返回一个列表,列表内有r个列表,这r个列表中每个有c个val.
例1:
r = 1
c = 2
val = 3
返回 [[3,3]]
例2:
r = 2
c = 3
val = 0
返回 [[0, 0, 0], [0, 0, 0]]
请不要使用任何列表自带函数。
| input_int = int(input())
input_int_2 = int(input())
input_int_3 = int(input())
# 请不要更改此行以上的代码
def create_matrix(r, c, val):
return r *[c * [val]]
# 请不要更改此行以下的代码
print(create_matrix(input_int, input_int_2, input_int_3)) | 5,445 | complete | input_int = int(input()) # r
input_int_2 = int(input()) # c
input_int_3 = int(input()) # val
# 请不要更改此行以上的代码
# 在这里编写代码
def create_matrix(input_int, input_int_2, input_int_3):
c_list = [input_int_3]
r_list = input_int_2 * c_list
# 创造出有r个c_list的r_list
my_list = []
for i in range(0, 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:"233";s:10:"questionid";s:3:"250";s:8:"testtype";s:1:"0";s:8:"... | 30,150 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,792 | 1,201 | 变量和赋值 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) | 139,957 | complete | print(int(input())*3) | 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... | 589,477 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
14,845 | 470 | 硬币数 | 2,054 | 补全以下代码,将所有种类硬币的和打印出来。
注:题目中的yuan / jiao是硬币种类的拼音,没有其他含义。
| num_yuan = int(input())
num_jiao = int(input())
num_coins = num_yuan + num_jiao
print(num_coins) | 38,715 | complete | num_yuan = int(input())
num_jiao = int(input())
num_coins=num_yuan+num_jiao
print(num_coins) | 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:4:"1810";s:10:"questionid";s:4:"2054";s:8:"testtype";s:1:"0";s:8... | 174,932 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
38,680 | 257 | 判断1 | 366 | 补全代码,定义一个函数get_discount(),如果用户的身高小于140(不含),返回票价0,否则返回票价100。
| param = int(input())
def get_discount(height):
if (height < 140):
return 0
else:
return 100
print(get_discount(param)) | 151,411 | todo | param = int(input())
# 在此处补全代码
if param<140:
return 0;
else:
retutn 100;
print(get_discount(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:94:" File "__tester__.python3", line 7
retutn 100;
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N... | 631,377 | 2 | 0 | No error | No error | File "__tester__.python3", line 7
retutn 100;
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
2,440 | 19 | 列表1.6 | 148 | 将输入的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)) | 3,863 | 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:"122";s:10:"questionid";s:3:"148";s:8:"testtype";s:1:"0";s:8:"... | 21,124 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
44,712 | 2,084 | 范围 3.14 | 3,369 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int,存入cat_age。
* 如果cat_age大于或等于1,并且小于或等于10,打印'可以上飞机';
* 否则,打印'不能上飞机'。
例1:
输入:3
输出:可以上飞机
解释:1 < 3 < 10,所以打印'可以上飞机'。
例2:
输入:12
输出:不能上飞机
解释:12 > 10,所以打印'不能上飞机'。
| cat_age = int(input())
if (1 <= cat_age <= 10):
print('可以上飞机')
else:
print('不能上飞机') | 172,420 | todo | cat_age = int(input(""))
if 1 <= cat_age <= 10:
print("可以带上飞机")
else:
print("不能带上飞机") | 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:"2390";s:10:"questionid";s:4:"3369";s:8:"testtype";s:1:"0";s:8... | 719,426 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
16,796 | 626 | 输入和输出 1.10 | 2,925 | 按要求写出代码。
* 要求:
* 打印:"生日快乐!"(不打印引号)
| print("生日快乐!") | 44,951 | complete | 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:"2253";s:10:"questionid";s:4:"2925";s:8:"testtype";s:1:"0";s:8... | 200,689 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
12,485 | 440 | 输入和输出 1.14 | 2,933 | 按要求写出代码。
* 要求:
* 把用户输入的值后面加一个空格和一个字符串"岁"并打印。
* 最后有一个空行。
例1:
输入:8
输出:8 岁
例2:
输入:12
输出:12 岁
| temp = input()
print(temp,"岁") | 32,427 | complete | print(input(),"岁") | 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:"2273";s:10:"questionid";s:4:"2933";s:8:"testtype";s:1:"0";s:8... | 146,550 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
32,221 | 1,069 | 范围 3.9 | 3,293 | 按要求写出代码。
* 要求:
* 把用户输入的值转换成int,存入time。
* 如果time大于8且小于22,打印'醒着';
* 否则,打印'睡觉了'。
例1:
输入:8
输出:睡觉了
解释:8=8,8不符合大于8小于22的条件,所以打印'睡觉了'。
例2:
输入:12
输出:醒着
解释:12符合大于8小于22的条件,所以打印'醒着'。
| time = int(input())
if 8 < time < 22:
print('醒着')
else:
print('睡觉了') | 119,599 | todo | time=int(input())
if 8<time<22:
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:120:" File "__tester__.python3", line 2
if 8<time<22:
^
SyntaxError: invalid character in identifier
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:... | 506,180 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
if 8<time<22:
^
SyntaxError: invalid character in identifier
| SyntaxError | SyntaxError | SyntaxError | error |
800 | 102 | LAB1.2 | 48 | 运动中消耗的卡路里是以下几项的和 减去75.4991 乘以时间 再除以 8.368:
年龄的0.2757倍 体重的0.03295倍 心率的1.0781倍
补全下列代码,给定了年龄,体重,心率,时间,计算出卡路里的消耗量
| age = int(input())
weight = int(input())
heart_rate = int(input())
time = int(int(input()))
calories_burned = ((age * 0.2757) + (weight * 0.03295) + (heart_rate * 1.0781) - 75.4991) * time / 8.368
print(calories_burned) | 1,066 | complete | age = int(input())
weight = int(input())
heart_rate = int(input())
time = int(int(input()))
# 在此处补全代码
calories_burned = (0.2757*age + 0.03295*weight + 1.0781*heart_rate-75.4991)*time/8.368
print(calories_burned) | 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:2:"35";s:10:"questionid";s:2:"48";s:8:"testtype";s:1:"0";s:8:"te... | 5,833 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
40,764 | 1,302 | 字典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
# 请不要... | 158,100 | todo | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
global 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
... | 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:109:" File "__tester__.python3", line 7
global user_info{}
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:3;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"s... | 662,611 | 2 | 0 | No error | No error | File "__tester__.python3", line 7
global user_info{}
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
19,624 | 718 | 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) | 54,707 | 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: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:"2279";s:10:"questionid";s:4:"2974";s:8:"testtype";s:1:"0";s:8... | 242,034 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 4, in <module>
print('my age:'+ my_age)
TypeError: can only concatenate str (not "int") to str
" | TypeError | No error | No error | TypeError | TypeError | error |
906 | 64 | 循环LAB3 | 98 | 编写一个函数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) | 1,289 | complete | param = input()
def count_spaces_and_commas(param):
x=0
y=0
for i in str(param):
if i == ",":
x += 1
if i == " ":
y += 1
print("有" + str(x) + "个逗号" + "和" + str(y) + "个空格")
count_spaces_and_commas(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:"107";s:10:"questionid";s:2:"98";s:8:"testtype";s:1:"0";s:8:"t... | 16,012 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
37,386 | 1,252 | 循环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) | 147,262 | complete | x = int(input())
y = int(input())
# 在此处编写代码
def increment_by_three(a,b):
if b <=a:
pass
elif b-a< 3:
print(a)
elif b-a ==3:
print(a,b)
elif b-a >3:
for i in range(a,b,3):
print(i)
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: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:"460";s:10:"questionid";s:3:"398";s:8:"testtype";s:1:"0";s:8:"... | 613,784 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
3,704 | 31 | 字典1.2 | 241 | 请定义两个字典score_dict和status_dict,存储以下三个人的信息,第一项是score,第二项是status:
john: 90,active
jane: 100, active
james: 0, inactive
| test_param = input()
# 请不要更改此行以上的代码
score_dict = {'john':90, 'jane':100, 'james':0}
status_dict = {'john':'active', 'jane':'active', 'james':'inactive'}
# 请不要更改此行以下的代码
print(score_dict[test_param])
print(status_dict[test_param]) | 6,446 | complete | test_param = input()
# 请不要更改此行以上的代码
#eg:
#input:john
#output:90
# active
# 在这里编写代码
score_dict = {'john': 90,'jane':100,'james':0}
status_dict = {'john':'active','jane':'active','james':'inactive'}
my_dict = {}
for key1, values1 in score_dict.items(): #注意items
for key2, values2 in status_dict.i... | 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:"186";s:10:"questionid";s:3:"241";s:8:"testtype";s:1:"0";s:8:"... | 32,393 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
30,330 | 301 | 块&缩进 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('蜘蛛很少') | 103,196 | complete | num_spiders = int(input())
num_cats = int(input())
#在这里补全代码
if num_spiders > 10 and num_cats > num_spiders:
print("猫会吃掉蜘蛛")
elif num_spiders > 10 and num_cats <= num_spiders:
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:"2405";s:10:"questionid";s:4:"3464";s:8:"testtype";s:1:"0";s:8... | 441,520 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
47,396 | 2,291 | 递归1.2 | 572 | 补全代码,使其打印出还有几天到周日。
例如输入3,则打印
还有4天到周日
还有3天到周日
还有2天到周日
还有1天到周日
到周日了!
| input_int = int(input())
# 请不要更改此行以上的代码
def days_left_to_sunday(day):
if day < 7:
print("还有" + str(7 - day) + "天到周日")
days_left_to_sunday(day + 1)
else:
print("到周日了!")
# 请不要更改此行以下的代码
days_left_to_sunday(input_int) | 181,912 | complete | input_int = int(input())
# 请不要更改此行以上的代码
def days_left_to_sunday(day):
if day < 7:
print("还有" + str(7 - day) + "天到周日")
days_left_to_sunday(day + 1)
else:
print("到周日了!")
# 请不要更改此行以下的代码
days_left_to_sunday(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: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:"663";s:10:"questionid";s:3:"572";s:8:"testtype";s:1:"0";s:8:"... | 754,205 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
44,379 | 2,054 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 170,202 | todo | age = int(input())
print("my age is ",end=" ")
print(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:"... | 710,978 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
29,465 | 20 | 判断1 | 366 | 补全代码,定义一个函数get_discount(),如果用户的身高小于140(不含),返回票价0,否则返回票价100。
| param = int(input())
def get_discount(height):
if (height < 140):
return 0
else:
return 100
print(get_discount(param)) | 93,467 | 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:3:"408";s:10:"questionid";s:3:"366";s:8:"testtype";s:1:"0";s:8:"... | 405,733 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
27,425 | 672 | 输入和输出 1.8 | 3,474 | 按要求写出代码。
* 要求:
* 把用户输入的两个值转换成整数型,并分别存储。
* 打印这两个输入值的和。
例1:
输入:3 4
输出:7
解释:3 + 4 = 7
例2:
输入:9 10
输出:19
解释:9 + 10 = 19
| num1 = int(input())
num2 = int(input())
print (num1 + num2) | 78,195 | todo | num1=int(input()
num2=int(input()
print=num1+num2 | 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:128:" File "__tester__.python3", line 1
num1=int(input()
SyntaxError: invalid syntax. Perhaps you forgot a comma?
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testres... | 695,680 | 2 | 0 | No error | No error | File "__tester__.python3", line 1
num1=int(input()
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| SyntaxError | SyntaxError | SyntaxError | error |
6,374 | 244 | 硬币数 | 2,054 | 补全以下代码,将所有种类硬币的和打印出来。
注:题目中的yuan / jiao是硬币种类的拼音,没有其他含义。
| num_yuan = int(input())
num_jiao = int(input())
num_coins = num_yuan + num_jiao
print(num_coins) | 12,266 | todo | num_yuan = int(11)
num_jiao = int(12)
# 在这里填写代码
print(num_yuan)
| 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:2;s:10:"actualmark";d:1;s:11:"testresults";a:2:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"1810";s:10:"questionid";s:4:"2054";s:8:"testtype";s:1:"0";s:8... | 67,373 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
41,107 | 414 | 列表LAB0.2 | 548 | 请写一个函数multiply_lists(),传入一个列表参数my_list, 和一个int参数factor。
将my_list扩张到factor倍,并返回。
例如:
my_list = [1, 2]
factor = 3
返回 [1, 2, 1, 2, 1, 2]
请不要使用任何列表自带函数。
| import ast
input_list = ast.literal_eval(input())
input_int = int(input())
# 请不要更改此行以上的代码
def multiply_lists(my_list, factor):
return my_list * factor
# 请不要更改此行以下的代码
print(multiply_lists(input_list, input_int)) | 159,484 | todo | import ast
input_list = ast.literal_eval(input())
input_int = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def multiply_lists(my_list,int(factor)):
result = []
for i in range(factor):
result += my_list
return result
# 请不要更改此行以下的代码
print(multiply_lists(input_list, input_int)) | 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:145:" File "__tester__.python3", line 7
def multiply_lists(my_list,int(factor)):
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";... | 668,843 | 2 | 0 | No error | No error | File "__tester__.python3", line 7
def multiply_lists(my_list,int(factor)):
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
39,543 | 1,264 | 递归2.2 | 592 | 用递归编写一个函数power_of_two(num)计算2的num次方。
如power_of_two(0) 应返回2的0次方,即1;
power_of_two(1) 应返回2的1次方,即2;
power_of_two(3) 应返回2的3次方,即8。
| input_int = int(input())
# 请不要更改此行以上的代码
def power_of_two(num):
if num == 0:
return 1
else:
return 2 * power_of_two(num - 1)
# 请不要更改此行以下的代码
print(power_of_two(input_int)) | 153,782 | complete | input_int = int(input())
# 请不要更改此行以上的代码
def power_of_two(num):
if num ==0: # 在此补充:
return 1 # 在此补充
else:
return power_of_two(num-1)*2# 在此补充
# 请不要更改此行以下的代码
print(power_of_two(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:"671";s:10:"questionid";s:3:"592";s:8:"testtype";s:1:"0";s:8:"... | 641,579 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
28,527 | 467 | 函数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() | 84,411 | todo | # 在这里编写代码
# 请不要更改此行以下的代码
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: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:"3190";s:10:"questionid";s:4:"6231";s:8:"testtype";s:1:"0";s:8... | 378,869 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 4, in <module>
welcome_to_circle_cat()
NameError: name 'welcome_to_circle_cat' is not defined
" | NameError | No error | No error | NameError | NameError | error |
14,876 | 226 | 递归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,758 | todo | input_int_0 = int(input())
input_int_1 = int(input())
# 请不要更改此行以上的代码
def palindrome(x, y):
if x == 0:
return 0
else:
return str(y) +" " + str(palindrome(x-1, y)) + " " + str(y)
# 请不要更改此行以下的代码
print(palindrome(input_int_0, input_int_1)) | 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:"694";s:10:"questionid";s:3:"609";s:8:"testtype";s:1:"0";s:8:"... | 175,420 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
43,299 | 1,437 | 循环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)) | 165,500 | complete | param = int(input())
param = str(param)
count = 0
for i in param:
if i == '1':
count+=1
print(count) | 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:"451";s:10:"questionid";s:3:"396";s:8:"testtype";s:1:"0";s:8:"... | 692,145 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
11,756 | 366 | 输入和输出 1.8 | 3,474 | 按要求写出代码。
* 要求:
* 把用户输入的两个值转换成整数型,并分别存储。
* 打印这两个输入值的和。
例1:
输入:3 4
输出:7
解释:3 + 4 = 7
例2:
输入:9 10
输出:19
解释:9 + 10 = 19
| num1 = int(input())
num2 = int(input())
print (num1 + num2) | 30,154 | complete | a=int(input(''))
b=int(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: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:"2410";s:10:"questionid";s:4:"3474";s:8:"testtype";s:1:"0";s:8... | 147,356 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
46,373 | 2,227 | 判断debug2 | 369 | 以下有一个函数print_num, 若输入的内容等于10,则将其打印出来,否则什么也不做。
代码中有错误,请改正其中的错误。
| param = int(input())
def print_num(input_num):
if (input_num == 10):
print(input_num)
print_num(param) | 179,106 | todo | input_num = int(input())
def print_num(input_num):
if (input_num == 10):
return(input_num)
print (input_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:3;s:10:"actualmark";d:2;s:11:"testresults";a:3:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"423";s:10:"questionid";s:3:"369";s:8:"testtype";s:1:"0";s:8:"... | 744,205 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.