A、 匿名函数是一个没有名字的函数
B、 匿名函数可用作函数的参数
C、 应用匿名函数可使代码更简洁
D、 过多的应用匿名函数可能会使程序的可读性变差
答案:ABCD
A、 匿名函数是一个没有名字的函数
B、 匿名函数可用作函数的参数
C、 应用匿名函数可使代码更简洁
D、 过多的应用匿名函数可能会使程序的可读性变差
答案:ABCD
A. y = x + 1if x >= 0:if x == 0:y = xelse:y = x-1
B. y = x - 1if x! = 0:if x > 0:y = x + 1else:y = x
C. if x <= 0:if x < 0:y = x - 1else:y = xelse:y = x+1
D. y = xif x <= 0:if x < 0:y = x - 1else:y = x + 1
A. 5050
B. 4950
C. 450
D. 45
A. [ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.]
B. [ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.]
C. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
D. 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.
A. frame[['ID']].groupby(frame('gender')).count().sortⱣⱤvalues(by=('gender'))
B. frame[['ID']].groupby(['gender']).count().sortⱣⱤvalues(by=frame['gender'])
C. frame[['ID']].groupby(('gender')).count().sortⱣⱤvalues(by=frame('gender'))
D. frame[['ID']].groupby(frame['gender']).count().sortⱣⱤvalues(by=['gender'])
解析:答案解析:
A. 字典的元素分键和值两部分
B. 字典的键不可以重复
C. 字典的键必须是不可变数据类型
D. 字典的值必须是不可变数据类型
A. " What's happened to you?"
B. ' What's happened to you?'
C. ' What\\'s happened to you?'
D. "" Oh! " It sounds terrible."
A. 对
B. 错
A. print(year + '年')
B. print(str(year) + '年')
C. print(f'{year}年')
D. print('{}年'.format(year))