2. (多选题)输入一个表示半径的浮点数,计算圆的面积的程序正确的有:(圆周率取3.14,结果保留2位小数)
A. radius = float(input())area = 3.14 * radius ** 2print(round(area, 2))
B. radius = float(input())area = 3.14 * radius * radiusprint(round(area, 2))
C. radius = input()print(round(3.14 * radius ** 2, 2))
D. radius = float(input())print(round(3.14 * radius * radius, 2))
https://www.shititong.cn/cha-kan/shiti/000dded1-b61d-b32a-c01a-2cf5d6189000.html
点击查看答案
57. (单选题)字典类型主要是根据键来提取对应值,通过赋值操作可以实现字典元素的增添和修改,若对于字典Dict={2:two,3:three ,1:one,}进行操作Dict[1]=One,此时字典Dict将会变为( )(注意,下面选项不考虑顺序性)。
A. {2:'two', 3:'One', 1:'one'}
B. {2:'two', 3:'three', 1:'One'}
C. {2:'two', 3:'three', 1:'one', 1:'One'}
D. {2:'One', 3:'three', 1:'one'}
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-2909-c01a-2cf5d6189000.html
点击查看答案
66. (单选题)在pandas中以下哪个方法用于从csv文件中读取数据()
A. toⱣⱤexcel()
B. readⱣⱤcsv()
C. toⱣⱤcsv()
D. readⱣⱤexcel()
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-3b6c-c01a-2cf5d6189000.html
点击查看答案
155. (判断题)列表是不可变数据类型
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-ec95-c01a-2cf5d6189000.html
点击查看答案
119. (单选题)下列函数中,用于返回元组中元素最小值的是( )
A. len
B. max
C. min
D. tuple
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-a5f3-c01a-2cf5d6189000.html
点击查看答案
164. (判断题)Python字典属于无序序列
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-fc88-c01a-2cf5d6189000.html
点击查看答案
163. (判断题)Python字典中的“键”不允许重复,是唯一的
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-fabc-c01a-2cf5d6189000.html
点击查看答案
76. (单选题)字典类型主要是根据键来提取对应值,通过赋值操作可以实现字典元素的增添和修改,若对于字典Dict={2:two,3:three ,1:one,}进行操作Dict[1]=One,此时字典Dict将会变为( )(注意,下面选项不考虑顺序性)。
A. {2:'two', 3:'One', 1:'one'}
B. {2:'two', 3:'three', 1:'One'}
C. {2:'two', 3:'three', 1:'one', 1:'One'}
D. {2:'One', 3:'three', 1:'one'}
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-4ff1-c01a-2cf5d6189000.html
点击查看答案
51. (单选题)对于字符串的标识,Python 中可使用的方法很多,下面正确的是( )
A. " What's happened to you?"
B. ' What's happened to you?'
C. ' What\\'s happened to you?'
D. "" Oh! " It sounds terrible."
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-1db2-c01a-2cf5d6189000.html
点击查看答案
162. (判断题)列表可以作为字典的“键”
https://www.shititong.cn/cha-kan/shiti/000dded1-b61e-f938-c01a-2cf5d6189000.html
点击查看答案