题目内容

下面程序的运行结果为(______ )import numpy as npage = [12, 13, '', 18, '', 26, 25]age_without_missing = []for i in range(len(age)): if age[i] != '': age[i] = int(age[i]) age_without_missing.append(int(age[i]))age_mean = int(np.mean(age_without_missing))for i in range(len(age)): if age[i] == '': age[i] = age_meanprint(age)

查看答案
更多问题

下列代码的输出结果是custom = lambda x: x[1]print(custom((4,5,6)))

A. 4
B. 5
C. 6
D. 8

如下代码使用Python的第三方模块numpy求解平均值,输出结果正确的是import numpy as npNumber = [66, 55, 44, 88]Number_mean = np.mean(Number)Number_mean = round(Number_mean, 2)print(Number_mean)

A. 64
B. 63
C. 63.0
D. 63.25

下面程序运行结果是(______ )class Clock: def __init__(self, time): self.time = time def print_time(self): return self.time boston_clock = Clock('5:30')paris_clock = boston_clockparis_clock.time = '10:30'print(boston_clock.print_time()+' and '+paris_clock.print_time())

下面的代码的输出结果是lst = list(range(2, 15, 3))print(9 in lst)

A. 0
B. False
C. -1
D. True

答案查题题库