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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33,144 | 970 | 列表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)) | 123,795 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
flag = true
def palindrome(temp_list):
global flag
if temp_list[1:len(temp_list)-1:1] == temp_list[len(temp_list)-2:0:-1]:
flag = true
else:
flag = false
return flag
# 请不要更改此行以下的代码
print(palindrome(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:8;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"514";s:10:"questionid";s:3:"476";s:8:"testtype";s:1:"0";s:8:"... | 572,311 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 4, in <module>
flag = true
NameError: name 'true' is not defined
" | NameError | No error | No error | NameError | NameError | error |
32,053 | 1,064 | 输入和输出 1.10 | 2,925 | 按要求写出代码。
* 要求:
* 打印:"生日快乐!"(不打印引号)
| print("生日快乐!") | 119,166 | 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... | 502,550 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
14,492 | 341 | 字典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) | 37,825 | todo | input_dict = input()
my_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
my_dict={}
key=[1,3,5,7]
for i in my_dict:
if (i==key):
my_dict.remove(key)
# 请不要更改此行以下的代码
print(my_dict) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:2;s:11:"testresults";a:4:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"609";s:10:"questionid";s:3:"551";s:8:"testtype";s:1:"0";s:8:"... | 173,579 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
27,002 | 721 | 循环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) | 75,664 | todo | param = input()
# 在此处编写代码
def count_spaces_and_commas(param):
spaces=0
commas=0
for i in range(0,len(param)):
if i == ' ':
spaces+=1
elif 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: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:"464";s:10:"questionid";s:3:"399";s:8:"testtype";s:1:"0";s:8:"... | 336,556 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
6,816 | 300 | 硬币数 | 2,054 | 补全以下代码,将所有种类硬币的和打印出来。
注:题目中的yuan / jiao是硬币种类的拼音,没有其他含义。
| num_yuan = int(input())
num_jiao = int(input())
num_coins = num_yuan + num_jiao
print(num_coins) | 12,948 | todo |
num_a= int(7)
num_b= int(5)
num_c = (7 + 5)
print(num_c) | 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... | 66,529 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
44,956 | 2,084 | 循环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) | 173,035 | todo | param = int(input())
def double_until_thousand(number):
while number <= 1000:
print (number)
number *= 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:0;s:11:"testresults";a:1:{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... | 720,574 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 8, in <module>
double_until_one_thousand(param)
NameError: name 'double_until_one_thousand' is not defined. Did you mean: 'double_until_thousand'?
" | NameError | No error | No error | NameError | NameError | error |
1,900 | 51 | 循环3.1 | 92 | 补全以下代码,打印输入字符串的第5位(有疑问请咨询小组长)。
例如:
输入:"CircleCat"
打印:"l"
| param = input()
print(param[4]) | 2,743 | complete | strVal = input()
x = strVal[4]
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: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:"82";s:10:"questionid";s:2:"92";s:8:"testtype";s:1:"0";s:8:"te... | 18,423 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
15,526 | 553 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 41,496 | 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:"... | 186,199 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
6,615 | 263 | 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) | 12,420 | 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:"... | 63,165 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
8,537 | 348 | 输入和输出 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) | 19,007 | todo | test=int(input('3'))
tests=int(input('4'))
print=(test+tests)
num=int(input('9'))
nums=int(input('10'))
print(num+nums) | 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:"2410";s:10:"questionid";s:4:"3474";s:8:"testtype";s:1:"0";s:8... | 94,467 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 4, in <module>
num=int(input('9'))
EOFError: EOF when reading a line
" | EOFError | No error | No error | EOFError | EOFError | error |
40,520 | 1,324 | 输入和输出 1.3 | 2,862 | 打印三行字面字符串:
00000
0 0 0
00000
| print("00000")
print("0 0 0")
print("00000") | 156,927 | todo | print("""000\t
0 0 0\t
00000""") | 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:"2226";s:10:"questionid";s:4:"2862";s:8:"testtype";s:1:"0";s:8... | 656,617 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
132 | 64 | debug类型1 | 43 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 225 | complete | age = int(input())
print("my age is " + str(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:2:"22";s:10:"questionid";s:2:"43";s:8:"testtype";s:1:"0";s:8:"te... | 2,544 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
645 | 64 | 判断2 | 70 | 定义一个函数get_age_status,
输入年龄,如果在0至18(不含),打印“未成年人”;
如果在18-65(不含),打印“工作中”;
如果在65以上,打印“退休了”。
| param = int(input())
def get_age_status(age):
if age < 18:
return "未成年人"
elif age < 65:
return "工作中"
else:
return "退休了"
print(get_age_status(param)) | 851 | todo | param = int(input())
# 在此补全代码
def get_age_status():
if param>=0 and param<18:
print("未成年人")
elif param>=18 and param<65:
print("工作中")
else:
if param>=65:
print("退休了")
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: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:2:"53";s:10:"questionid";s:2:"70";s:8:"testtype";s:1:"0";s:8:"te... | 3,661 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 13, in <module>
print(get_age_status(param))
TypeError: get_age_status() takes 0 positional arguments but 1 was given
" | TypeError | No error | No error | TypeError | TypeError | error |
37,197 | 932 | 变量和赋值 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) | 146,749 | complete | num_cats = input()
num_dogs = input()
print(int(num_cats) + int(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... | 611,328 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
2,224 | 56 | 判断1 | 69 | 补全代码,定义一个函数get_discount(),如果用户的身高小于140(不含),返回票价0,否则返回票价100。
| param = int(input())
def get_discount(height):
if (height < 140):
return 0
else:
return 100
print(get_discount(param)) | 3,168 | todo | param = int(input())
def get_discount(param):
if (param<140):
print("0")
else:
print("100")
return(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:114:" File "__tester__.python3", line 8
return(get_discount(param))
^
SyntaxError: 'return' outside function
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:... | 17,559 | 2 | 0 | No error | No error | File "__tester__.python3", line 8
return(get_discount(param))
^
SyntaxError: 'return' outside function
| SyntaxError | SyntaxError | SyntaxError | error |
26,934 | 724 | 递归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)) | 75,425 | 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:"... | 347,855 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
2,758 | 15 | 字典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]) | 5,005 | todo | test_param = input()
# 请不要更改此行以上的代码
# 在这里编写代码
my_dict = {'john':'90''active','jane':'100''active','james':'0''inactive'}
# 请不要更改此行以下的代码
print(my_dict[test_param]) | 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:"186";s:10:"questionid";s:3:"241";s:8:"testtype";s:1:"0";s:8:"... | 24,209 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
39,290 | 1,289 | 输入和输出 1.2 | 2,860 | 打印字符串:
I am Python!
| print("I am Python!") | 153,193 | 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... | 638,565 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
11,904 | 339 | 递归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)) | 30,603 | complete | 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(pal... | 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:"689";s:10:"questionid";s:3:"608";s:8:"testtype";s:1:"0";s:8:"... | 178,341 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
22,037 | 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
for i in input_list:
if int(i)>max:
max=int(i)
return(max)
min=0
for i in input_list:
if int(i)<min:
min=int(i)
return(min... | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:6;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:8;s:10:"actualmark";d:2;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:"... | 267,554 | 1 | 6 | No error | No error | No error | No error | No error | LogicError | error |
24,627 | 717 | 循环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) | 67,578 | 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... | 304,513 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
1,511 | 15 | 定义变量 | 28 | 定义一个叫做 num_students 的变量,并将它的值设置为100. | num_students = 100
print(num_students) | 2,208 | 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:2:"12";s:10:"questionid";s:2:"28";s:8:"testtype";s:1:"0";s:8:"te... | 10,561 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
3,392 | 20 | 函数1.0 | 106 | 定义一个叫做 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() | 5,978 | todo |
def welcome_to_circle_cat():
print("welcome to circle cat")
# 请不要更改此行以下的代码
welcome_to_cirlcle_cat() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:1;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"121";s:10:"questionid";s:3:"106";s:8:"testtype";s:1:"0";s:8:"... | 28,926 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 5, in <module>
welcome_to_cirlcle_cat()
NameError: name 'welcome_to_cirlcle_cat' is not defined
" | NameError | No error | No error | NameError | NameError | error |
233 | 31 | 加法 | 30 | 写一行代码,将 功德 (karma) 加一。
如:
karma = 5
则输出
6
| karma = int(input())
karma = karma + 1
print(karma) | 363 | 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:2:"15";s:10:"questionid";s:2:"30";s:8:"testtype";s:1:"0";s:8:"te... | 1,774 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
46,899 | 2,257 | 范围 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)
| 180,617 | 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... | 749,651 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
18,382 | 408 | 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)) | 51,466 | complete | x = int(input())
y = int(input())
z = int(input())
# 在这里补全代码
def smallest_among_three(x, y, z):
if ((x<y)and(x<z)):
print (x)
elif ((y<x)and(y<z)):
print(y)
elif ((z<x)and(z<y)):
print(z)
smallest_among_three(x, y, z) | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i: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,487 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
29,447 | 895 | 输入和输出 1.2 | 2,860 | 打印字符串:
I am Python!
| print("I am Python!") | 93,407 | 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... | 405,525 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
7,200 | 226 | 判断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) | 13,785 | complete | param = int(input())
def convert_num(input_num):
if (input_num >= 10):
input_num = input_num - 10
return(input_num)
elif (input_num < 10):
return(input_num)
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:"... | 70,903 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
25,718 | 590 | 循环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) | 70,668 | complete | param = input()
# 在此处编写代码
def count_spaces_and_commas(x):
a=0
b=0
for i in str(x):
if i==',':
a=a+1
elif i==' ':
b=b+1
continue
result='有'+str(a)+'个逗号和'+str(b)+'个空格'
print(result)
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:"... | 323,063 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
4,745 | 60 | 字典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... | 7,454 | complete | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
# 在这里编写代码
user_info={}
def log_user(user_name):
if user_name not in user_info:
user_info[user_name]=1
else:
user_info[user_name]+=1
return
def print_user_log(user_name):
if user_name in user_info:
... | 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:"266";s:10:"questionid";s:3:"258";s:8:"testtype";s:1:"0";s:8:"... | 39,054 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
36,914 | 1,267 | 列表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)) | 146,091 | todo | my_list = input().split(',')
new_list = []
# 请不要更改此行以上的代码
while my_list:
new_list.append(my_list(pop))
# 请不要更改此行以下的代码
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:"... | 608,134 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 5, in <module>
new_list.append(my_list(pop))
NameError: name 'pop' is not defined
" | NameError | No error | No error | NameError | NameError | error |
29,936 | 818 | 递归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)) | 99,698 | todo | input_int = int(input())
# 请不要更改此行以上的代码
def power_of_two(num):
if num ==0
return 1
# 在此补充
else:
return 2**num
# 在此补充
# 请不要更改此行以下的代码
print(power_of_two(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:96:" File "__tester__.python3", line 5
if num ==0
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist"... | 429,283 | 2 | 0 | No error | No error | File "__tester__.python3", line 5
if num ==0
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
35,464 | 1,214 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 138,854 | complete | x=input()
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: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... | 584,066 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
41,875 | 1,365 | 输入和输出 1.14 | 2,933 | 按要求写出代码。
* 要求:
* 把用户输入的值后面加一个空格和一个字符串"岁"并打印。
* 最后有一个空行。
例1:
输入:8
输出:8 岁
例2:
输入:12
输出:12 岁
| temp = input()
print(temp,"岁") | 161,733 | complete | a = input()
print(a,'岁') | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2273";s:10:"questionid";s:4:"2933";s:8:"testtype";s:1:"0";s:8... | 677,258 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
32,447 | 1,071 | 范围 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)
| 120,480 | 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... | 708,442 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
29,712 | 411 | 分支 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) | 95,536 | 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... | 413,457 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
21,883 | 250 | 输入和输出 1.13 | 2,931 | 按要求写出代码。
* 要求:
* 把用户输入的值打印出来。
* 最后有一个空行。
例1:
输入:3
输出:3
例2:
输入:hi
输出:hi
| result = input()
print(result) | 61,037 | 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... | 307,030 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
39,880 | 1,153 | 字典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
# 请不要... | 154,493 | 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 False
# 在这... | 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:"... | 645,740 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
33,796 | 1,119 | 列表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)) | 126,211 | todo | line_list = input().split(';')
temp_list = []
for i in line_list:
temp_list.append(i.split(','))
# 请不要更改此行以上的代码
def sum_of_matrix(temp_list):
a=0
for i in range(0,len(temp_list)):
for j in range(0,len(temp_list[i])):
a=a+int(temp_list[i][j])
print(a)
# 请不要更改此行以下的代码
pr... | 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:"... | 536,248 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
19,103 | 429 | 字典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
# 请不要... | 53,071 | complete | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
def add_user(user_name,pass_word):
user_info = {}
if user_name not in user_info:
user_info[user_name] = pass_word
return user_info
def verify_user(user_name,pass_word):
if user_name in user_info:
if user_info... | 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:"616";s:10:"questionid";s:3:"553";s:8:"testtype";s:1:"0";s:8:"... | 264,595 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 25, in <module>
print(verify_user(i[0], i[1]))
File "__tester__.python3", line 12, in verify_user
if user_name in user_info:
NameError: name 'user_info' is not defined
" | NameError | No error | No error | NameError | NameError | error |
46,752 | 2,264 | 范围 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)
| 180,358 | 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... | 748,628 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
33,870 | 1,138 | 函数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() | 126,277 | 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:81:"Sorry: IndentationError: expected an indented block (__tester__.python3, line 2)
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandbo... | 535,744 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block (__tester__.python3, line 2)
| IndentationError | IndentationError | IndentationError | error |
38,164 | 1,265 | 循环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) | 149,235 | complete | x = int(input())
y = int(input())
def increment_by_three(x,y):
for i in range(x,y,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:"... | 623,467 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
37,624 | 807 | 定义变量 | 325 | 定义一个叫做 num_students 的变量,并将它的值设置为100. | num_students = 100
print(num_students) | 147,946 | 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:"... | 628,002 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
27,954 | 791 | 字典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
# 请不要... | 82,146 | 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:
if user_info[user_name]==pass_word:
return True
return ... | 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:"... | 369,039 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
37,564 | 1,266 | 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) | 147,745 | 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:"... | 614,274 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,620 | 1,031 | 定义变量 | 325 | 定义一个叫做 num_students 的变量,并将它的值设置为100. | num_students = 100
print(num_students) | 139,416 | 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:"... | 586,567 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
46,585 | 2,179 | 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)) | 179,756 | complete | x = int(input())
y = int(input())
z = int(input())
def smallest_among_three(x,y,z):
smallest=x
if y<smallest:
smallest=y
if z<smallest:
smallest=z
return smallest
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:"... | 746,646 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
21,077 | 659 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 58,985 | complete | param = str(input())
# 在此处编写代码
def reverse_string(param):
pos = len(param) - 1
result = ''
while pos >= 0:
result = result + param[pos]
pos -= 1
print(result)
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:"... | 256,652 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
41,356 | 641 | 循环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) | 160,158 | todo | param = int(input())
param = int(input())
# 在此处补全代码
def double_until_one_thousand(param):
while (param <= 1000):
print (param)
param *= 2
return param
print(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:4:"2074";s:10:"questionid";s:4:"2432";s:8:"testtype";s:1:"0";s:8... | 700,390 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 2, in <module>
param = int(input())
EOFError: EOF when reading a line
" | EOFError | No error | No error | EOFError | EOFError | error |
18,969 | 714 | 分支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) | 52,777 | todo | num_spiders = int(input())
if num_spiders == 15:
web_size = num_spiders
else:
web_size = 20
web_size = web_size * 2 | 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:"2330";s:10:"questionid";s:4:"3129";s:8:"testtype";s:1:"0";s:8... | 240,749 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
10,006 | 342 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 23,870 | complete | param = input()
# 在此处编写代码
def reverse_string(x):
return x[::-1]
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:"... | 114,688 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
7,980 | 296 | 列表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)) | 16,460 | complete | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def palindrome(str_list):
length = len(str_list)
palindrome_length = int((length)/2)
count = 0
for i in range(1,palindrome_length):
if(str_list[i] == str_list[length-(i+1)]):
count = count + 1
if(count == (palindrome_length-1)):
return T... | 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:"... | 84,823 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
17,594 | 508 | 定义变量 | 325 | 定义一个叫做 num_students 的变量,并将它的值设置为100. | num_students = 100
print(num_students) | 48,056 | 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:"... | 213,310 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
3,643 | 14 | 列表3.1 | 239 | 请编写一个函数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)) | 6,342 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def get_max(temp_list):
n = int(temp_list[0])
for i in temp_list:
if n > int(i):
n = i
return n
# 请不要更改此行以下的代码
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: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:"178";s:10:"questionid";s:3:"239";s:8:"testtype";s:1:"0";s:8:"... | 31,805 | 1 | 3 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 13, in <module>
print(get_max(temp_list))
File "__tester__.python3", line 8, in get_max
if n > int(i):
TypeError: '>' not supported between instances of 'str' and 'int'
" | TypeError | No error | No error | TypeError | TypeError | error |
32,070 | 789 | debug类型1 | 339 | 请改正以下代码中的错误
| age = int(input())
print("my age is " + str(age)) | 119,206 | 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:"... | 505,067 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
43,009 | 1,403 | 判断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)) | 164,356 | 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:"... | 687,671 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
34,036 | 1,184 | 输入和输出 1.14 | 2,933 | 按要求写出代码。
* 要求:
* 把用户输入的值后面加一个空格和一个字符串"岁"并打印。
* 最后有一个空行。
例1:
输入:8
输出:8 岁
例2:
输入:12
输出:12 岁
| temp = input()
print(temp,"岁") | 128,239 | todo | a=input()
print('a',end=' ')
print('岁\n') | 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... | 553,099 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
41,761 | 1,350 | 列表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)) | 161,294 | complete | import ast
input_list = ast.literal_eval(input())
input_int = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def multiply_lists(l,n):
return l*n
# 请不要更改此行以下的代码
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:"... | 675,621 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
46,782 | 2,271 | 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)) | 180,423 | 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)
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:"... | 748,920 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
29,290 | 20 | 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) | 92,422 | 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... | 401,693 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
32,158 | 1,087 | 输入和输出 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) | 119,471 | complete | a=input()
b=input()
a=int(a)
b=int(b)
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... | 504,034 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
46,831 | 2,181 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 180,526 | todo | param = input()
def reverse_string(param):
for i in range(len(param)-1, -1, -1):
return (str[i], end = "")
print(reverse_string(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:112:"Sorry: IndentationError: expected an indented block after 'for' statement on line 3 (__tester__.python3, line 4)";s:11:"maxpossmark";d:4;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14... | 749,368 | 2 | 0 | No error | No error | Sorry: IndentationError: expected an indented block after 'for' statement on line 3 (__tester__.python3, line 4) | IndentationError | IndentationError | IndentationError | error |
25,874 | 770 | 循环2.3 | 391 | 请完成以下代码,使其打印
1
2
3
5
6
7
(跳过4)
| for i in range(1,8):
if (i == 4):
continue
print(i) | 71,032 | 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:"... | 316,628 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
31,869 | 1,067 | 循环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) | 117,391 | complete | param = input()
def count_spaces_and_commas(param):
# 在此处编写代码
x,y=0,0
for i in param:
if i == ' ':
x+=1
elif i== ",":
y+=1
print('有'+str(y)+'个逗号和'+str(x)+'个空格')
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:"... | 495,270 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
43,920 | 2,046 | 列表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)) | 168,519 | todo | temp_list = input().split(',')
# 请不要更改此行以上的代码
# 在这里编写代码
def count_negative(list):
res=0
for i in list:
if i<0:
res+=1
return res
# 请不要更改此行以下的代码
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:"... | 704,267 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 13, in <module>
print(count_negative(temp_list))
File "__tester__.python3", line 8, in count_negative
if i<0:
TypeError: '<' not supported between instances of 'str' and 'int'
" | TypeError | No error | No error | TypeError | TypeError | error |
44,668 | 2,084 | 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) | 172,332 | complete | 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
calories_burned *= time
calories_burned /= 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... | 718,090 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
42,174 | 1,365 | 递归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,... | 162,239 | todo | input_int_0 = int(input())
input_int_1 = int(input())
# 请不要更改此行以上的代码
def palindrome(x, y):
if x == 0:
return str(0)
else:
x-1
left = str(x-1+y)
mid = ' '+palindrome(x-1,y)+' '
right = str(x-1+y)
return left+mid+right
# 请不要更改此行以下的代码
print(palindrom... | 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:"694";s:10:"questionid";s:3:"609";s:8:"testtype";s:1:"0";s:8:"... | 679,247 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
25,199 | 829 | 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)) | 69,525 | complete | i = int(input())
def is_leap_year(year):
# 在这里补全代码
if (year%4==0 and year%100!=0) or (year%4==0 and year%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:"... | 307,814 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
20,179 | 616 | 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) | 56,774 | complete | 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) | 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... | 249,683 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
41,986 | 1,365 | 列表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)) | 162,047 | todo | my_list = input().split(',')
new_list = []
# 请不要更改此行以上的代码
# 在这里编写代码
for i in my_list:
if i != '':
new_list.append(my_list.pop())
# 请不要更改此行以下的代码
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: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:"484";s:10:"questionid";s:3:"470";s:8:"testtype";s:1:"0";s:8:"... | 678,280 | 1 | 3 | No error | No error | No error | No error | No error | LogicError | error |
19,709 | 608 | 字典LAB3 | 560 | 【(附加题)找出第一个重复的字符】
编写一个函数get_first_duplicate(input_str),找出一个String里第一次重复的字符:
例1:
输入: "abbcddeea"
输出: "a"
解释: a在第0位和最后一位, b在第1和第2位, d在第4和第5位, e在第6和第7位, 由于a是第一个出现并重复的字符, 因此返回a
例2:
输入: "abbcd"
输出: "b"
解释: b是唯一重复的, 因此返回b
例3:
输入: "abcd"
输出: ""
解释: 没有重复字符, 返回空字符
如果没有思路请看下面提示
此̶题̶的̶难̶点̶在̶于̶,̶不̶仅̶要̶找̶出̶重̶复̶的̶字̶符̶,̶还̶要... | input_str = input()
# 请不要更改此行以上的代码
def get_first_duplicate(input_str):
pos = len(input_str) + 1
res = ""
position = {}
for i in range(0, len(input_str)):
if input_str[i] in position:
if position[input_str[i]] < pos:
pos = i
res = input_str[i]
... | 55,323 | complete | input_str = input()
# 请不要更改此行以上的代码
# 在这里编写代码
def get_first_duplicate(input_str):
position = {}
res = ''
pos = int(len(input_str))
for i in input_str:
if i not in position:
position[i] = input_str.index(i)
else:
if input_str.index(i) < pos:
... | 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:7;s:10:"actualmark";d:7;s:11:"testresults";a:7:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"650";s:10:"questionid";s:3:"560";s:8:"testtype";s:1:"0";s:8:"... | 242,014 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
13,331 | 242 | 函数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() | 34,744 | todo | def print_something()
print("Welcome to circle cat!")
# 请不要更改此行以下的代码
welcome_to_cirlcle_cat()
print("Welcome to circle cat!")
print("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:117:" File "__tester__.python3", line 1
def print_something()
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{... | 157,542 | 2 | 0 | No error | No error | File "__tester__.python3", line 1
def print_something()
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
18,376 | 408 | 判断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)) | 51,463 | todo | param = int(input())
# 在此补全代码
def get_age_status(param):
if (0<=param<18):
print('未成年人')
elif (18<=param<65):
print('工作中')
elif (param>=65):
print('退休了')
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: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:"413";s:10:"questionid";s:3:"367";s:8:"testtype";s:1:"0";s:8:"... | 226,343 | 1 | 5 | No error | No error | No error | No error | No error | LogicError | error |
13,724 | 178 | 分支 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) | 35,740 | todo | user_age=int(input())
if user_age==18:
print(num_candles=18)
else:
print(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: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:"2425";s:10:"questionid";s:4:"3477";s:8:"testtype";s:1:"0";s:8... | 161,398 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 3, in <module>
print(num_candles=18)
TypeError: 'num_candles' is an invalid keyword argument for print()
" | TypeError | No error | No error | TypeError | TypeError | error |
27,157 | 499 | 列表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)) | 76,190 | todo | input_int = int(input())
input_int_2 = int(input())
input_int_3 = int(input())
# 请不要更改此行以上的代码
# 在这里编写代码
def create_matrix(r,c,val):
matrix=[]
for i in range(r):
for j in range(c):
matrix[i][j]=val
return matrix
# 请不要更改此行以下的代码
print(create_matrix(input_int, input_int_2, inpu... | 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:"599";s:10:"questionid";s:3:"549";s:8:"testtype";s:1:"0";s:8:"... | 338,810 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 14, in <module>
print(create_matrix(input_int, input_int_2, input_int_3))
File "__tester__.python3", line 11, in create_matrix
matrix[i][j]=val
IndexError: list index out of range
" | IndexError | No error | No error | IndexError | IndexError | error |
35,538 | 1,168 | 列表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)) | 139,183 | todo | 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: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:"477";s:10:"questionid";s:3:"445";s:8:"testtype";s:1:"0";s:8:"... | 585,387 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 7, in <module>
my_list[0]=x
NameError: name 'x' is not defined
" | NameError | No error | No error | NameError | NameError | error |
21,382 | 769 | 循环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) | 59,825 | todo | x = int(input())
y = int(input())
def increment_by_three(x,y):
while(True):
print(x)
x+=3
if (x>=y):
break
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:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:4;s:10:"actualmark";d:3;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:"... | 260,556 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
21,245 | 771 | 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) | 59,387 | todo | x = int(input())
y = int(input())
num_1 = x/y
print(num_1)
num_2 = num_1/y
print(num_2)
num_3 = num_2/y
print(num_3)
| O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:2;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:2;s:10:"actualmark";d:0;s:11:"testresults";a:2:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:3:"388";s:10:"questionid";s:3:"343";s:8:"testtype";s:1:"0";s:8:"... | 259,028 | 1 | 2 | No error | No error | No error | No error | No error | LogicError | error |
40,831 | 1,331 | 输入和输出 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) | 158,193 | complete | num_1 = int(input())
num_2 = int(input())
num_3 = int(input())
num_4 = num_1+num_2+num_3
print(num_4) | 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... | 666,051 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
39,825 | 932 | 字典LAB3 | 560 | 【(附加题)找出第一个重复的字符】
编写一个函数get_first_duplicate(input_str),找出一个String里第一次重复的字符:
例1:
输入: "abbcddeea"
输出: "a"
解释: a在第0位和最后一位, b在第1和第2位, d在第4和第5位, e在第6和第7位, 由于a是第一个出现并重复的字符, 因此返回a
例2:
输入: "abbcd"
输出: "b"
解释: b是唯一重复的, 因此返回b
例3:
输入: "abcd"
输出: ""
解释: 没有重复字符, 返回空字符
如果没有思路请看下面提示
此̶题̶的̶难̶点̶在̶于̶,̶不̶仅̶要̶找̶出̶重̶复̶的̶字̶符̶,̶还̶要... | input_str = input()
# 请不要更改此行以上的代码
def get_first_duplicate(input_str):
pos = len(input_str) + 1
res = ""
position = {}
for i in range(0, len(input_str)):
if input_str[i] in position:
if position[input_str[i]] < pos:
pos = i
res = input_str[i]
... | 154,462 | todo | input_str = input()
abbsdsa
# 请不要更改此行以上的代码
# 在这里编写代码
position = {}
pos = []
def get_first_duplicate(input_str):
for i in input_str:
if i in position:
pos.append(input_str.find(i))
else:
position[i]=input_str.find(i)
if pos == []:
return ''
else:
... | 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 14
if pos == []:
^
SyntaxError: invalid character in identifier
";s:11:"maxpossmark";d:7;s:10:"actualmark";i:0;s:11:"testresults";a:0... | 645,325 | 2 | 0 | No error | No error | File "__tester__.python3", line 14
if pos == []:
^
SyntaxError: invalid character in identifier
| SyntaxError | SyntaxError | SyntaxError | error |
12,386 | 335 | 判断debug1 | 368 | 以下有一个函数convert_num, 若输入的内容大于10(包括10),则将其减去10。
代码中有错误,请改正其中的错误。
| param = int(input())
def convert_num(input_num):
if (input_num >= 10):
input_num = input_num - 10
print(input_num)
convert_num(param) | 32,142 | 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:"... | 145,961 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
26,483 | 637 | 字典LAB0.1 | 550 | 定义一个字典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]) | 73,618 | 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:"604";s:10:"questionid";s:3:"550";s:8:"testtype";s:1:"0";s:8:"... | 326,618 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
47,949 | 2,276 | 范围 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)
| 183,115 | 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... | 759,970 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
16,459 | 579 | 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) | 44,251 | 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... | 209,769 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
33,665 | 520 | 范围 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('睡觉了') | 125,938 | todo | time=int(input())
if 8<time:
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:"2380";s:10:"questionid";s:4:"3293";s:8:"testtype";s:1:"0";s:8... | 534,304 | 1 | 1 | No error | No error | No error | No error | No error | LogicError | error |
22,204 | 458 | 分支 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) | 61,614 | todo | user_age=int(input())
if user_age ==18
num_candles=18
print(num_candles)
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:107:" File "__tester__.python3", line 2
if user_age ==18
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:5;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sou... | 269,395 | 2 | 0 | No error | No error | File "__tester__.python3", line 2
if user_age ==18
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
34,482 | 1,196 | 循环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)) | 130,633 | todo | param = int(input())
# 在此处编写代码
x=0
for i in param:
if (i==1):
x=x+1
print(x)
else:
x=x
continue
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:"... | 548,936 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 5, in <module>
for i in param:
TypeError: 'int' object is not iterable
" | TypeError | No error | No error | TypeError | TypeError | error |
126 | 20 | 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) | 212 | todo | age = int(input())
weight = int(input())
heart_rate = int(input())
time = int(input())
calories_burned=time*((0.2757*age+0.03295*weight+1.0781*heart_rate-75.4991)%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:98:" File "__tester__.python3", line 6
print(calories_burned)
^
SyntaxError: invalid syntax
";s:11:"maxpossmark";d:2;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelis... | 10,584 | 2 | 0 | No error | No error | File "__tester__.python3", line 6
print(calories_burned)
^
SyntaxError: invalid syntax
| SyntaxError | SyntaxError | SyntaxError | error |
25,149 | 659 | 递归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)) | 69,221 | 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:"... | 306,536 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
45,823 | 2,140 | 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) | 176,855 | complete | 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: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:"2279";s:10:"questionid";s:4:"2974";s:8:"testtype";s:1:"0";s:8... | 735,020 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
36,492 | 364 | 变量和赋值 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) | 144,532 | complete | a=int(input())*3
print(a)
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2295";s:10:"questionid";s:4:"3020";s:8:"testtype";s:1:"0";s:8... | 602,830 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
35,674 | 1,214 | 循环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) | 139,603 | todo | param = int(input())
# 在此处补全代码
def double_until_one_thousand(param):
while 2*param <= 1000:
param = param*2
print(param)
print(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: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... | 587,105 | 1 | 4 | No error | No error | No error | No error | No error | LogicError | error |
11,647 | 382 | 函数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() | 29,803 | todo | def welcome_to_circle_cat():
print("Welcome to circle cat!")
welcome_to_circle_cat()
welcome_to_circle_cat()
welcome_to_cirlcle_cat() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:1;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:1;s:10:"actualmark";d:0;s:11:"testresults";a:1:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2203";s:10:"questionid";s:4:"2824";s:8:"testtype";s:1:"0";s:8... | 135,898 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 5, in <module>
welcome_to_cirlcle_cat()
NameError: name 'welcome_to_cirlcle_cat' is not defined
" | NameError | No error | No error | NameError | NameError | error |
36,988 | 72 | 变量和赋值 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) | 146,138 | complete | a=int(input())
a=a*3
print(a)
print() | O:32:"qtype_coderunner_testing_outcome":11:{s:6:"status";i:1;s:10:"isprecheck";b:0;s:10:"errorcount";i:0;s:12:"errormessage";s:0:"";s:11:"maxpossmark";d:5;s:10:"actualmark";d:5;s:11:"testresults";a:5:{i:0;O:28:"qtype_coderunner_test_result":14:{s:2:"id";s:4:"2295";s:10:"questionid";s:4:"3020";s:8:"testtype";s:1:"0";s:8... | 609,812 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
1,573 | 20 | 循环2.3 | 89 | 补全以下代码,使其打印0到5的所有值。
| for i in range(0, 10):
print(i)
if (i == 5):
break | 2,312 | todo | for i in range(0, 6):
print(i)
i=i+1
| 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 3)
";s:11:"maxpossmark";d:1;s:10:"actualmark";i:0;s:11:"testresults";a:0:{}s:14:"sourcecodelist";N;s:11:"sandboxinfo";a:... | 14,253 | 2 | 0 | No error | No error | Sorry: IndentationError: unexpected indent (__tester__.python3, line 3)
| IndentationError | IndentationError | IndentationError | error |
16,844 | 626 | 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) | 45,088 | complete | 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) | 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... | 201,157 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
28,955 | 878 | 字典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
# 请不要... | 88,447 | todo | input_dict = input()
input_dict = eval(input_dict)
# 请不要更改此行以上的代码
user_info={}
def add_user(user_name, pass_word):
user_info[use_name]= pass_word
def verify_user(user_name, pass_word):
if user_name in user_info:
if user_info[use_name] == pass_word:
return True
return False
# 在... | 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:"616";s:10:"questionid";s:3:"553";s:8:"testtype";s:1:"0";s:8:"... | 395,655 | 1 | 1 | ***运行错误***
Traceback (most recent call last):
File "__tester__.python3", line 16, in <module>
add_user(i[0], i[1])
File "__tester__.python3", line 6, in add_user
user_info[use_name]= pass_word
NameError: name 'use_name' is not defined
" | NameError | No error | No error | NameError | NameError | error |
28,449 | 878 | 判断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)) | 83,879 | complete | param = int(input())
def get_age_status(param):
if param > 0 and param < 18:
return "未成年人"
elif 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:"... | 377,033 | 1 | 0 | No error | No error | No error | No error | No error | No error | no_error |
41,973 | 1,365 | 循环LAB1 | 397 | 编写一个函数reverse_string,返回输入的字符串倒过来的值。
如:
输入: CircleCat
返回: taCelcriC
| param = input()
def reverse_string(str):
str = str[::-1]
return str
print(reverse_string(param)) | 162,028 | todo | param = input()
# 在此处编写代码
def reverse_string(param):
x=''
for i in param[::-1]:
x = x + i
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:"... | 678,168 | 1 | 4 | 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.