单选题 对负数取平方根,即使用函数math.sqrt(x),其中x为负数,将产生( )

A、 什么都不产生
B、 虚数
C、 程序崩溃
D、 ValueError错误
下载APP答题
由4l***r4提供 分享 举报 纠错

相关试题

单选题 以下不能创建一个字典的语句是( )

A、dict = {}
B、dict = {(4,5,6):'dictionary'}
C、dict= {4:6}
D、dict = {[4,5,6]:'dictionary'}

单选题 Python中布尔变量的值为( )

A、真,假
B、0,1
C、T,F
D、True,False

单选题 对于字典d={'abc':1, 'qwe':2, 'zxc':3},len(d)的结果为( )

A、6
B、3
C、12
D、9

单选题 下列运算符的使用错误的是( )

A、1 + 'a'
B、[1, 2, 3] + [4, 5, 6]
C、3 * 'abc'
D、-10 % -3

单选题 以下( )不可能出现在and的操作真值表中

A、F T F
B、T T T
C、T F T
D、F F F

单选题 下列 for 语句中,在 in 后使用不正确的是( ) For var in ( ) : print(var)

A、set('str')
B、(1)
C、[1, 2, 3, 4, 5]
D、range(0, 10, 5)

单选题 以下的布尔代数运算错误的是( )

A、(True or x) == True
B、not (a and b) == not (a) and not (b)
C、(False and x) == False
D、(True or False) == True

单选题 下列( )类型数据是不可变化的:

A、集合
B、字典
C、元组
D、列表