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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
25,411 | 708 | 范围 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('不能上飞机') | 70,121 | complete | 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: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:"2390";s:10:"questionid";s:4:"3369";s:8:"testtype";s:1:"0";s:8... | 310,706 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
31,883 | 1,049 | 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) | 117,484 | 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... | 494,330 | 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 |
46,980 | 2,291 | 输入和输出 1.12 | 2,929 | 按要求写出代码。
* 要求:
* 打印:
*
你好
再见
(第一行有七个空格,最后有一个新的空行)
| print(" 你好\n再见") | 180,798 | 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... | 750,486 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
42,588 | 1,387 | 输入和输出 1.14 | 2,933 | 按要求写出代码。
* 要求:
* 把用户输入的值后面加一个空格和一个字符串"岁"并打印。
* 最后有一个空行。
例1:
输入:8
输出:8 岁
例2:
输入:12
输出:12 岁
| temp = input()
print(temp,"岁") | 163,032 | todo | input="8"
print(input," 岁")
input="12"
print(input," 岁")
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:"2273";s:10:"questionid";s:4:"2933";s:8:"testtype";s:1:"0";s:8... | 682,726 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
3,519 | 44 | 列表3.2 | 238 | 请编写一个函数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)) | 6,140 | complete | temp_list = input().split(',')
def count_negative(temp_list):
count = 0
for i in temp_list:
if int(i) < 0:
count = 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: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:"173";s:10:"questionid";s:3:"238";s:8:"testtype";s:1:"0";s:8:"... | 31,878 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
16,410 | 593 | 列表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)) | 44,117 | complete | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def get_max(my_list):
max=my_list[0]
for i in my_list:
if i > max:
max = i
return max
# 请不要更改此行以下的代码
print(get_max(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: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:"... | 197,495 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,738 | 60 | 字典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,451 | 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,973 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
17,464 | 469 | 循环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)) | 47,400 | complete | str = input("")
print(str.count("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: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:"... | 211,071 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
38,647 | 1,134 | 判断debug2 | 369 | 以下有一个函数print_num, 若输入的内容等于10,则将其打印出来,否则什么也不做。
代码中有错误,请改正其中的错误。
| param = int(input())
def print_num(input_num):
if (input_num == 10):
print(input_num)
print_num(param) | 151,353 | todo | param = int(input())
def print_num(input_num):
if param = 10:
print(input_num)
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:99:" File "__tester__.python3", line 4
if param = 10:
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:3;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodeli... | 630,970 | 2 | 0 | No error | No error | File "__tester__.python3", line 4
if param = 10:
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
8,780 | 173 | 加法 | 326 | 写一行代码,将 功德 (karma) 加一。
如:
karma = 5
则输出
6
| karma = int(input())
karma = karma + 1
print(karma) | 19,781 | complete | karma = int(input())
# 在这里填写代码
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: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:"370";s:10:"questionid";s:3:"326";s:8:"testtype";s:1:"0";s:8:"... | 96,980 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
32,855 | 301 | 循环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)) | 122,380 | complete | param = int(input())
a = str(param)
count_ones = 0
for i in a :
if (i == "1"):
count_ones = count_ones + 1
else:
count_ones = count_ones
continue
print(count_ones)
| 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:"... | 519,441 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
33,994 | 1,163 | 字典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
# 请不要... | 127,732 | complete | 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 and user_info[user_name] == pass_word:
return True
else:
return F... | 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:"... | 541,941 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
19,854 | 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)) | 55,446 | todo | i = int(input())
def is_leap_year(year):
if int(i/4) >= int(1) and int(1/100) != int() or int(i/400) >=int(1) >= int(1):
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: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:"403";s:10:"questionid";s:3:"348";s:8:"testtype";s:1:"0";s:8:"... | 332,544 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
23,105 | 774 | 列表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,344 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
def get_max(temp_list):
if (len(temp_list) == 1):
return (int(temp_list[0]))
else:
max_num = int(temp_list[0])
for i in temp_list:
if (int(i) >= max_num):
max_num = int(i)
return max_num
... | 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:"492";s:10:"questionid";s:3:"472";s:8:"testtype";s:1:"0";s:8:"... | 278,285 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
13,055 | 382 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 33,779 | complete | param = input()
def reverse_string(param):
x = ''
for i in str(param):
x=i+x
return x
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: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:"456";s:10:"questionid";s:3:"397";s:8:"testtype";s:1:"0";s:8:"... | 180,251 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
23,420 | 765 | 循环3.3 | 395 | 请逐位打印一个字符串。
如:
输入:CircleCat
输出
C
i
r
c
l
e
c
a
t
| param = input()
for i in param:
print(i) | 64,573 | complete | param = input()
for i in param:
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: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:"447";s:10:"questionid";s:3:"395";s:8:"testtype";s:1:"0";s:8:"... | 287,146 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,274 | 95 | 字典LAB2 | 258 | 【考勤计数器】
编写一个程序来记录考勤,包含一个函数:
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... | 6,907 | todo | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
user_name = {}
def log_user(name):
if name in user_name:
user_name[name] += 1
else:
user_name[name] = 1
def print_user_log(name):
print(user_name[name])
# 请不要更改此行以下的代码
for i in input_dict['log']:
... | 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:"266";s:10:"questionid";s:3:"258";s:8:"testtype";s:1:"0";s:8:"... | 35,431 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 19, in <module>
print_user_log(i)
File "__tester__.python3", line 13, in print_user_log
print(user_name[name])
KeyError: 'Flirter'
" | KeyError | No error | No error | KeyError | KeyError | error |
45,352 | 418 | 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) | 174,297 | complete | x = int(input())
y = int(input())
# 在此处补全代码
x=x/y
print(x)
x=x/y
print(x)
x=x/y
print(x) | 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:"... | 726,417 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,361 | 42 | 递归1.2 | 294 | 补全代码,使其打印出还有几天到周日。
例如输入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) | 7,038 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def days_left_to_sunday(day):
if day < 7:
print("还有" + str(7 - day) + "天到周日")
#在这里添加一行代码
days_left_to_sunday(day)
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:"304";s:10:"questionid";s:3:"294";s:8:"testtype";s:1:"0";s:8:"... | 37,605 | 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(day)
File "__tester__.python3", line 8, in days_left_to_sunday
days_left_to_sunday(day)
File "__... | RecursionError | No error | No error | RecursionError | RecursionError | error |
37,261 | 848 | 列表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)) | 147,005 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def count_negative(temp_list):
temp_list = str(temp_list)
count = 0
for i in temp_list:
if 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:"... | 614,179 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 13, in <module>
print(count_negative(temp_list))
File "__tester__.python3", line 9, in count_negative
if i < 0:
TypeError: '<' not supported between instances of 'str' and 'int'
" | TypeError | No error | No error | TypeError | TypeError | error |
48,194 | 2,340 | 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) | 184,023 | complete | x = int(input())
y = int(input())
print(int(x/y))
print(int(x/y/y))
print(int(x/y/y/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: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:"... | 763,875 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
44,711 | 2,084 | 范围 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('睡觉了') | 172,413 | complete | time = int(input(""))
if 8 < time < 22 :
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:"2380";s:10:"questionid";s:4:"3293";s:8:"testtype";s:1:"0";s:8... | 719,390 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
28,267 | 878 | 分支 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,152 | todo | 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: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:"2315";s:10:"questionid";s:4:"3126";s:8:"testtype";s:1:"0";s:8... | 374,359 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
42,848 | 1,387 | 循环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)) | 163,869 | todo | param = int(input())
# 在此处编写代码
def count_ones(x):
num=0
for i in str(x):
if i=="1":
num=num+1
print(num)
count_ones(param)
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:"... | 685,908 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 9, in <module>
print(num)
NameError: name 'num' is not defined. Did you mean: 'sum'?
" | NameError | No error | No error | NameError | NameError | error |
32,966 | 1,033 | 列表2.2 | 470 | 用循环,pop()和append()将my_list反转过来存进new_list。
| my_list = input().split(',')
new_list = []
# 请不要更改此行以上的代码
for i in range(0, len(my_list)):
new_list.append(my_list.pop())
# 请不要更改此行以下的代码
print(",".join(new_list)) | 123,180 | todo | my_list = input().split(',')
new_list = []
# 请不要更改此行以上的代码
# 在这里编写代码
for i in my_list[]:
my_list.pop()
new_list.append(my_list.pop())
# 请不要更改此行以下的代码
print(",".join(new_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:112:" File "__tester__.python3", line 5
for i in my_list[]:
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:4;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14... | 525,082 | 2 | 0 | No error | No error | File "__tester__.python3", line 5
for i in my_list[]:
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
9,026 | 325 | 硬币数 | 2,054 | 补全以下代码,将所有种类硬币的和打印出来。
注:题目中的yuan / jiao是硬币种类的拼音,没有其他含义。
| num_yuan = int(input())
num_jiao = int(input())
num_coins = num_yuan + num_jiao
print(num_coins) | 20,844 | complete | num_yuan = int(input())
num_jiao = int(input())
num_coins = num_jiao + num_yuan
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... | 100,186 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
41,909 | 1,365 | 判断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)) | 161,961 | todo | param = int(input())
# 在此处补全代码
def get_discount(param):
if param < 140:
result 0
else:
result 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:90:" File "__tester__.python3", line 6
result 0
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:1... | 677,766 | 2 | 0 | No error | No error | File "__tester__.python3", line 6
result 0
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
27,753 | 779 | 块&缩进 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('蜘蛛很少') | 80,795 | todo | num_spiders = int(input())
num_cats = int(input())
if num_spiders > 10:
if num_cats > num_spiders:
print("猫会吃掉蜘蛛")
elif num_cat<=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:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:1;s:11:"testresults";a:2:{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... | 581,429 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 6, in <module>
elif num_cat<=num_spiders:
NameError: name 'num_cat' is not defined
" | NameError | No error | No error | NameError | NameError | error |
25,817 | 771 | 列表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)) | 70,959 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
def get_max(my_list):
i=0
for i in range(0,len(my_list)):
if my_list[i]>my_list[i+1]:
b=my_list[i+1]
my_list[i+1]=my_list[i]
my_list[i]=b
i+=1
return my_list[i+1]
# 请不要更改此行以下的代码
print(get_... | 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:"... | 324,962 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 14, in <module>
print(get_max(temp_list))
File "__tester__.python3", line 7, in get_max
if my_list[i]>my_list[i+1]:
IndexError: list index out of range
" | IndexError | No error | No error | IndexError | IndexError | error |
13,145 | 427 | LAB1.2 | 344 | 运动中消耗的卡路里是以下几项的和 减去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) | 34,134 | todo | 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:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:234:" File "__tester__.python3", line 7
calories_burned = (0.2757*age+0.03295*weight+1.0781*heart_rate-75.4991)*time)/8.368
... | 155,077 | 2 | 0 | No error | No error | File "__tester__.python3", line 7
calories_burned = (0.2757*age+0.03295*weight+1.0781*heart_rate-75.4991)*time)/8.368
^
SyntaxError: unmatched ')'
| SyntaxError | SyntaxError | SyntaxError | error |
5,200 | 141 | 定义变量 | 325 | 定义一个叫做 num_students 的变量,并将它的值设置为100. | num_students = 100
print(num_students) | 8,781 | todo | # 在这里补全代码
def num_students=100
print(num_students) | 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:112:" File "__tester__.python3", line 2
def num_students=100
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14... | 81,632 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
def num_students=100
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
6,112 | 268 | 循环1.7 | 384 | 编写一个函数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) | 11,766 | complete | param = int(input())
# 在此处补全代码
def double_until_one_thousand(param);
while param<=1000:
print(param)
param=param*2
double_until_one_thousand(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:149:" File "__tester__.python3", line 4
def double_until_one_thousand(param);
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualma... | 60,735 | 2 | 0 | No error | No error | File "__tester__.python3", line 4
def double_until_one_thousand(param);
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
36,076 | 1,031 | 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)) | 141,104 | todo | x = int(input())
y = int(input())
z = int(input())
# 在这里补全代码
def smallest_among_three(x, y, z):
if (x < y < z or x < z < y):
print('x')
elif (y < x < z or y < z < x):
print('y')
else:
print('z')
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: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:"395";s:10:"questionid";s:3:"346";s:8:"testtype";s:1:"0";s:8:"... | 594,601 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
25,095 | 458 | 循环2.3 | 391 | 请完成以下代码,使其打印
1
2
3
5
6
7
(跳过4)
| for i in range(1,8):
if (i == 4):
continue
print(i) | 68,807 | complete | for i in range(1,8):
if i!=4:
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:"... | 305,264 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
13,107 | 178 | 判断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)) | 33,964 | todo | param = int(input())
# 在此处补全代码
def get_discount(param):
if param<140:
print('0')
else:
print('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: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:"408";s:10:"questionid";s:3:"366";s:8:"testtype";s:1:"0";s:8:"... | 154,348 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
21,001 | 701 | 判断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)) | 58,950 | todo | param = int(input())
# 在此处补全代码
def get_discount():
if param < 140:
print(get_discount(param) == 0)
else:
print(get_discount(param) == 100)
| 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:"408";s:10:"questionid";s:3:"366";s:8:"testtype";s:1:"0";s:8:"... | 256,160 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
44,697 | 2,084 | 分支 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) | 172,390 | todo | num_spiders = int (input "")
web_size = 1
if num_spider == 10:
web_size = web_size * 2
else:
web_size = (web_size * 3) + 5
print(num_spider, 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:129:" File "__tester__.python3", line 1
num_spiders = int (input "")
^^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testre... | 718,237 | 2 | 0 | No error | No error | File "__tester__.python3", line 1
num_spiders = int (input "")
^^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
30,857 | 1,026 | 加法 | 326 | 写一行代码,将 功德 (karma) 加一。
如:
karma = 5
则输出
6
| karma = int(input())
karma = karma + 1
print(karma) | 108,799 | complete | karma = int(input())
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: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:"370";s:10:"questionid";s:3:"326";s:8:"testtype";s:1:"0";s:8:"... | 461,479 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
32,753 | 1,104 | 变量和赋值 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) | 121,865 | todo | num_cats=input()
num_dogs=input()
print(num_cats+num_dogs) | 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... | 517,206 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
44,945 | 362 | 分支 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) | 172,931 | complete | 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: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:"2425";s:10:"questionid";s:4:"3477";s:8:"testtype";s:1:"0";s:8... | 720,229 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
32,652 | 781 | 分支1.7 | 3,129 | 按要求写出代码。
* 要求:
* 把用户输入的一个值转换成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等于15。最... | num_spiders = int(input())
if num_spiders != 15:
web_size = 20
else:
web_size = num_spiders
web_size = 2 * web_size
print(web_size) | 121,336 | 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:"2330";s:10:"questionid";s:4:"3129";s:8:"testtype";s:1:"0";s:8... | 514,174 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
31,278 | 933 | 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)) | 112,114 | todo | i = int(input())
def is_leap_year(i):
# 在这里补全代码
if i % 4 == 0 and i % 100 != 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: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:"... | 472,730 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
35,494 | 1,168 | 循环3.2 | 394 | 打印出输入字符串的长度。
如:
输入:CircleCat
打印:9
| param = input()
print(len(param)) | 139,031 | todo | param = input()
for i in range(len(param)):
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: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:"443";s:10:"questionid";s:3:"394";s:8:"testtype";s:1:"0";s:8:"... | 584,932 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 4, in <module>
count+=1
NameError: name 'count' is not defined
" | NameError | No error | No error | NameError | NameError | error |
10,780 | 342 | 递归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)) | 26,522 | todo | 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)) | 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:"... | 123,708 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
36,910 | 473 | 列表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)) | 146,072 | complete | temp_list = input().split(',')
# 请不要更改此行以上的代码
def palindrome(my_list):
if len(my_list) <= 2:
return True
start = 1
end = len(my_list) - 2
while start < end:
if my_list[start] != my_list[end]:
return False
start += 1
end -= 1
return True
... | 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:"514";s:10:"questionid";s:3:"476";s:8:"testtype";s:1:"0";s:8:"... | 612,814 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
39,372 | 1,218 | 块&缩进 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('蜘蛛很少') | 153,471 | complete | 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: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... | 639,825 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
43,697 | 2,022 | 输入和输出 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) | 167,402 | todo | a=7
b=19
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:"2410";s:10:"questionid";s:4:"3474";s:8:"testtype";s:1:"0";s:8... | 700,299 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
6,621 | 280 | 函数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() | 12,424 | complete | # 在这里编写代码
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: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:"476";s:10:"questionid";s:3:"402";s:8:"testtype";s:1:"0";s:8:"... | 63,384 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,335 | 25 | 字典LAB3 | 296 | 【(附加题)找出第一个重复的字符】
编写一个函数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 = inpu... | 7,006 | todo | print(get_first_duplicate(input_str))
input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
log = {}
def log_user(user_name):
if user_name in log:
log[user_name] += 1
else:
log[user_name] = 1
def print_user_log(user_name):
if user_name in log:
print(lo... | 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:6;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"313";s:10:"questionid";s:3:"296";s:8:"testtype";s:1:"0";s:8:"... | 35,655 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 1, in <module>
print(get_first_duplicate(input_str))
NameError: name 'get_first_duplicate' is not defined
" | NameError | No error | No error | NameError | NameError | error |
17,533 | 650 | 范围 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('不能上飞机') | 47,701 | complete | 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: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:"2390";s:10:"questionid";s:4:"3369";s:8:"testtype";s:1:"0";s:8... | 213,487 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
11,634 | 382 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 29,794 | 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:"... | 135,713 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,309 | 87 | 列表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)) | 137,808 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
max_number =my_list[0]
def get_max(my_list):
for i in my_list:
if int(i )> int (max_number):
max_number = i
return max_number
# 在这里编写代码
# 请不要更改此行以下的代码
print(get_max(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: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:"... | 581,388 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 3, in <module>
max_number =my_list[0]
NameError: name 'my_list' is not defined
" | NameError | No error | No error | NameError | NameError | error |
7,744 | 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)) | 15,969 | todo | x = int(input())
y = int(input())
z = int(input())
# 在这里补全代码
def smallest_among_three(x,y,z):
if (x >= y):
if(x>=z):
return z
else:
return y
if (y >= x):
if(y>=z):
return z
else:
return x
print(smallest_among_thre... | 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:"395";s:10:"questionid";s:3:"346";s:8:"testtype";s:1:"0";s:8:"... | 82,164 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
4,782 | 30 | 递归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,489 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def palindrome(num):
if num == 0:
return 0
else:
left =str(num)
mid = str(palindrome(num-1))
right =str(num)
return left + mid + 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:"... | 40,516 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
2,614 | 102 | 列表3.1 | 160 | 请编写一个函数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)) | 4,508 | complete | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def get_max(temp_list):
return max(temp_list)
# 请不要更改此行以下的代码
print(get_max(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: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:"133";s:10:"questionid";s:3:"160";s:8:"testtype";s:1:"0";s:8:"... | 21,982 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
45,158 | 2,096 | 输入和输出 1.9 | 6,215 | 按要求写出代码。
* 要求:
* 把用户输入的三个数先转换成整数形式,分别存储给不同的变量。
* 求出这三个变量的和,并打印。
例1:
输入:1 2 3
输出:6
解释:1 + 2 + 3 = 6
例2:
输入:6 7 8
输出:21
解释:6 + 7 + 8 = 21
| a = int(input())
b = int(input())
c = int(input())
print(a+b+c) | 173,611 | complete | print(int(input())+int(input())+int(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:"3173";s:10:"questionid";s:4:"6215";s:8:"testtype";s:1:"0";s:8... | 722,636 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
12,873 | 255 | 字典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) | 33,379 | complete | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
keys_to_remove = [1, 3, 5, 7]
for key in keys_to_remove:
if 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: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:"... | 151,868 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
32,466 | 1,069 | 判断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)) | 120,650 | todo | param = int(input())
def get_discount(param):
if param < 140:
return '0'
else:
return'100'
get_discount()
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:81:"Sorry: IndentationError: expected an indented block (__tester__.python3, line 5)
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandbo... | 512,106 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block (__tester__.python3, line 5)
| IndentationError | IndentationError | IndentationError | error |
35,030 | 898 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 135,287 | todo | param = input()
# 在此处编写代码
def reverse_string(x):
reverse_string = ""
while len(x)>=0:
count = len(x)-1
reverse_string += x[count]
count = count-1
return reverse_string
print(reverse_string(x)) | 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:"456";s:10:"questionid";s:3:"397";s:8:"testtype";s:1:"0";s:8:"... | 570,974 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 11, in <module>
print(reverse_string(x))
NameError: name 'x' is not defined
" | NameError | No error | No error | NameError | NameError | error |
12,185 | 259 | 字典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) | 31,666 | complete | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
for key in list(my_dict.keys()):
if key in [1, 3, 5, 7]:
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: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:"... | 143,020 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
9,591 | 390 | 变量和赋值 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) | 22,608 | complete | num_cats=int(input())
num_dogs=int(input())
print(num_cats+num_dogs) | 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... | 106,151 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
33,136 | 970 | 列表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)) | 123,793 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
max = 0
# 在这里编写代码
def get_max(temp_list):
global max
for i in range(len(temp_list)):
if temp_list[i] > str(max):
max = temp_list[i]
return max
else:
i = i+1
# 请不要更改此行以下的代码
print(get_max(temp_list)) | 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:"492";s:10:"questionid";s:3:"472";s:8:"testtype";s:1:"0";s:8:"... | 527,420 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
22,033 | 769 | 列表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)) | 61,299 | todo | import ast
input_list = ast.literal_eval(input())
# 请不要更改此行以上的代码
def get_min_plus_max(input_list):
max=0
min=0
for i in input_list:
if int(i)>max:
max=int(i)
return(max)
if int(i)<min:
return(min)
return(min+max)
# 请不要更改此行以... | 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:72:"Sorry: IndentationError: unexpected indent (__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:"sandboxinfo";a:... | 267,547 | 2 | 0 | No error | No error | Sorry: IndentationError: unexpected indent (__tester__.python3, line 8)
| IndentationError | IndentationError | IndentationError | error |
18,775 | 723 | 输入和输出 1.3 | 2,862 | 打印三行字面字符串:
00000
0 0 0
00000
| print("00000")
print("0 0 0")
print("00000") | 52,314 | todo | print(00000)
print(0 0 0)
print(00000) | 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:96:" File "__tester__.python3", line 2
print(0 0 0)
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist"... | 229,531 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
print(0 0 0)
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
16,179 | 572 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 43,304 | todo | param = input()
# 在此处编写代码
def reverse_string(param):
new_str = ""
for i in range(len(str(param))-1,0,-1):
new_str += str(param)[i];
return new_str
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:"... | 196,100 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
35,274 | 1,211 | 输入和输出 1.9 | 6,215 | 按要求写出代码。
* 要求:
* 把用户输入的三个数先转换成整数形式,分别存储给不同的变量。
* 求出这三个变量的和,并打印。
例1:
输入:1 2 3
输出:6
解释:1 + 2 + 3 = 6
例2:
输入:6 7 8
输出:21
解释:6 + 7 + 8 = 21
| a = int(input())
b = int(input())
c = int(input())
print(a+b+c) | 137,402 | complete | a=int(input())
b=int(input())
c=int(input())
print(a+b+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: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:"3173";s:10:"questionid";s:4:"6215";s:8:"testtype";s:1:"0";s:8... | 577,939 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
48,308 | 2,142 | 循环1.7 | 2,432 | 编写一个函数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) | 184,316 | complete | param = int(input())
# 在此处补全代码
def double_until_one_thousand(param):
while(param<=1000):
print(param)
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: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:"2074";s:10:"questionid";s:4:"2432";s:8:"testtype";s:1:"0";s:8... | 765,549 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
18,481 | 512 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 51,879 | 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:"... | 227,985 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
8,750 | 348 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 19,716 | 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:"... | 96,727 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
44,865 | 2,084 | 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)) | 172,838 | todo | x = int(input())
y = int(input())
z = int(input())
def smallest_among_three(x,y,z):
smallest = min(x,y,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: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:"395";s:10:"questionid";s:3:"346";s:8:"testtype";s:1:"0";s:8:"... | 719,867 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
38,234 | 1,265 | 列表2.2 | 470 | 用循环,pop()和append()将my_list反转过来存进new_list。
| my_list = input().split(',')
new_list = []
# 请不要更改此行以上的代码
for i in range(0, len(my_list)):
new_list.append(my_list.pop())
# 请不要更改此行以下的代码
print(",".join(new_list)) | 149,439 | todo | my_list = input().split(',')
new_list = []
# 请不要更改此行以上的代码
for i in my_list:
value=my_list.pop()
new_list=new_list.append(value)
# 在这里编写代码
# 请不要更改此行以下的代码
print(",".join(new_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: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:"484";s:10:"questionid";s:3:"470";s:8:"testtype";s:1:"0";s:8:"... | 623,701 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 12, in <module>
print(",".join(new_list))
TypeError: can only join an iterable
" | TypeError | No error | No error | TypeError | TypeError | error |
44,383 | 2,054 | 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) | 170,205 | 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:4:"3178";s:10:"questionid";s:4:"6216";s:8:"testtype";s:1:"0";s:8... | 710,976 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
19,347 | 153 | 列表LAB0.3 | 549 | 请写一个函数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)) | 53,609 | complete | input_int = int(input())
input_int_2 = int(input())
input_int_3 = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def create_matrix(input_int, input_int_2, input_int_3):
a=[input_int_3]*input_int_2
b=([a])*input_int
return b
# 请不要更改此行以下的代码
print(create_matrix(input_int, input_int_2, input_int_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:3:"599";s:10:"questionid";s:3:"549";s:8:"testtype";s:1:"0";s:8:"... | 238,619 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
6,355 | 275 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 12,146 | todo | age = int(input())
| 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:"... | 61,884 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
34,969 | 283 | 函数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() | 134,696 | complete | # 在这里编写代码
def welcome_to_circle_cat():
print("Welcome to circle cat!")
print("Welcome to circle cat!")
print("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... | 567,978 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
2,733 | 15 | 列表3.2 | 238 | 请编写一个函数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)) | 4,924 | complete | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def count_negative(temp_list):
count = 0
for i in temp_list:
if int(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: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:"173";s:10:"questionid";s:3:"238";s:8:"testtype";s:1:"0";s:8:"... | 23,818 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
44,048 | 2,004 | 范围 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)
| 169,026 | 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... | 707,598 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
18,427 | 380 | 字典LAB2 | 555 | 【考勤计数器】
编写一个程序来记录考勤,包含一个函数:
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_info[user_name]... | 51,690 | complete | 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_info[user_name])
else:
print(0)
# 请不要更改... | 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:"624";s:10:"questionid";s:3:"555";s:8:"testtype";s:1:"0";s:8:"... | 227,692 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
28,043 | 850 | 循环2.3 | 391 | 请完成以下代码,使其打印
1
2
3
5
6
7
(跳过4)
| for i in range(1,8):
if (i == 4):
continue
print(i) | 82,519 | 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:"... | 373,304 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
11,223 | 311 | 判断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)) | 28,234 | complete | 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: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:"... | 129,395 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,618 | 1,181 | 变量和赋值 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) | 139,358 | complete | num_cats=int(input(''))
num_dogs=int(input(''))
print(num_cats+num_dogs)
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... | 587,715 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
27,410 | 356 | 循环1.7 | 2,432 | 编写一个函数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) | 77,818 | todo | double_until_one_thousand = int(input())
# 在此处补全代码
if double_until_one_thousand <= 1000:
print (double_until_one_thousand)
double_until_one_thousand = 2 * double_until_one_thousand | 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:4:"2074";s:10:"questionid";s:4:"2432";s:8:"testtype";s:1:"0";s:8... | 375,610 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
36,794 | 933 | 字典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... | 145,740 | complete | 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:
pr... | 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:"3241";s:10:"questionid";s:4:"6290";s:8:"testtype";s:1:"0";s:8... | 606,821 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
9,505 | 166 | 判断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)) | 22,442 | complete | param = int(input())
# 在此处补全代码
def get_discount(height):
if height<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:"... | 106,384 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
14,772 | 204 | 分支1.7 | 3,129 | 按要求写出代码。
* 要求:
* 把用户输入的一个值转换成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等于15。最... | num_spiders = int(input())
if num_spiders != 15:
web_size = 20
else:
web_size = num_spiders
web_size = 2 * web_size
print(web_size) | 38,484 | 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:"2330";s:10:"questionid";s:4:"3129";s:8:"testtype";s:1:"0";s:8... | 175,419 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
25,078 | 765 | 递归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,761 | 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:"... | 315,535 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
12,708 | 448 | 输入和输出 1.2 | 2,860 | 打印字符串:
I am Python!
| print("I am Python!") | 33,022 | 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... | 149,787 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
26,762 | 801 | 判断debug2 | 369 | 以下有一个函数print_num, 若输入的内容等于10,则将其打印出来,否则什么也不做。
代码中有错误,请改正其中的错误。
| param = int(input())
def print_num(input_num):
if (input_num == 10):
print(input_num)
print_num(param) | 74,926 | todo | param = int(input())
def print_num(param):
if (param == 10):
return param
print(print_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: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:"423";s:10:"questionid";s:3:"369";s:8:"testtype";s:1:"0";s:8:"... | 333,144 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
2,246 | 62 | 循环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) | 3,201 | todo | param = int(input())
def double_until_one_thousand(param):
while param < 1000:
print(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: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:2:"71";s:10:"questionid";s:2:"85";s:8:"testtype";s:1:"0";s:8:"te... | 17,958 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
9,800 | 184 | 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) | 23,191 | 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:124:" File "__tester__.python3", line 1
print('I can’)
^
SyntaxError: EOL while scanning string literal
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";... | 108,875 | 2 | 0 | No error | No error | File "__tester__.python3", line 1
print('I can’)
^
SyntaxError: EOL while scanning string literal
| SyntaxError | SyntaxError | SyntaxError | error |
30,853 | 947 | 输入和输出 1.3 | 2,862 | 打印三行字面字符串:
00000
0 0 0
00000
| print("00000")
print("0 0 0")
print("00000") | 108,551 | todo | print(00000)
print(0 0 0)
print(00000)
| 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:96:" File "__tester__.python3", line 2
print(0 0 0)
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist"... | 460,811 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
print(0 0 0)
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
16,231 | 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() | 43,414 | 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... | 194,087 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,521 | 1,168 | 循环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) | 139,036 | complete | param = input()
def count_spaces_and_commas(param):
spaces=0
commas=0
for i in param:
if i ==" ":
spaces+=1
if i ==",":
commas+=1
print("有"+str(commas)+"个逗号和"+str(spaces)+"个空格")
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:"464";s:10:"questionid";s:3:"399";s:8:"testtype";s:1:"0";s:8:"... | 585,314 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
27,642 | 861 | 加法 | 326 | 写一行代码,将 功德 (karma) 加一。
如:
karma = 5
则输出
6
| karma = int(input())
karma = karma + 1
print(karma) | 79,928 | complete | karma = int(input())
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: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:"370";s:10:"questionid";s:3:"326";s:8:"testtype";s:1:"0";s:8:"... | 363,761 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,413 | 779 | 判断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) | 138,290 | todo | 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:2;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:81:" File "__tester__.python3", line 5
else:
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandbo... | 581,611 | 2 | 0 | No error | No error | File "__tester__.python3", line 5
else:
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
29,478 | 20 | 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)) | 93,472 | complete | 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(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:"... | 405,777 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,532 | 19 | 递归2.3 | 287 | 用递归编写一个函数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)) | 7,186 | todo | input_x = int(input())
input_y = int(input())
# 请不要更改此行以上的代码
def x_power_of_y(x, y):
# 在此补充
if y == 0:
return 1
else:
return X**y
# 请不要更改此行以下的代码
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: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:"296";s:10:"questionid";s:3:"287";s:8:"testtype";s:1:"0";s:8:"... | 38,286 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 15, in <module>
print(x_power_of_y(input_x, input_y))
File "__tester__.python3", line 12, in x_power_of_y
return X**y
NameError: name 'X' is not defined
" | NameError | No error | No error | NameError | NameError | error |
13,507 | 140 | 字典1.2 | 3,925 | 请定义两个字典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]) | 34,987 | complete | 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]) | 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:4:"2525";s:10:"questionid";s:4:"3925";s:8:"testtype";s:1:"0";s:8... | 161,618 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
42,528 | 555 | 变量和赋值 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) | 162,912 | todo | num_a = int(input()*3)
print(num_a)
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:"2295";s:10:"questionid";s:4:"3020";s:8:"testtype";s:1:"0";s:8... | 682,136 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
31,780 | 1,031 | 输入和输出 1.9 | 6,215 | 按要求写出代码。
* 要求:
* 把用户输入的三个数先转换成整数形式,分别存储给不同的变量。
* 求出这三个变量的和,并打印。
例1:
输入:1 2 3
输出:6
解释:1 + 2 + 3 = 6
例2:
输入:6 7 8
输出:21
解释:6 + 7 + 8 = 21
| a = int(input())
b = int(input())
c = int(input())
print(a+b+c) | 116,490 | complete | a=int(input())
b=int(input())
c=int(input())
d=a+b+c
print(int(d)) | 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:"3173";s:10:"questionid";s:4:"6215";s:8:"testtype";s:1:"0";s:8... | 579,225 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.