执行下列Python语句将产生的结果是( )i=1if(i): print(True)else:print(False)
A. 输出1
B. 输出True
C. 输出False
D. 编译错误
查看答案
下面的if语句统计"成绩(score)优秀的男生以及不及格的男生”的人数,正确的语句是( )
A. if (gender=='男' and score<60 or score>=90): n+=1
B. if (gender=='男' and score<60 and score>=90): n+=1
C. if (gender=='男' and (score<60 or score>=90)): n+=1
D. if (gender=='男' or score<60 or score>=90): n+=1
执行下列的Python语句将产生的结果是()。x=2;y=2.0if(x==y): print("Equal")else:print("Not Equal")
A. Equal
B. NotEqual
C. 编译错误
D. 运行时错误
在下面的异常堆栈中,异常类型是:__________。Traceback (most recent call last):File "", line 1, in TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
Python语句序列a,b=3,4a,b=b,aprint(a,b)的执行结果是( 1 )