题目内容

已知a=5,b=10,则条件表达式 a==b 的运行结果为()。

A. True
B. False
C. 1
D. 表达式错误

查看答案
更多问题

已知变量 a=2,b="02" ,则表达式 a>b 的值为:

A. False
B. True
C. 不相等
D. 系统报错

下面程序运行后,假设输入的是100,则运行结果是()。x=eval(input('input x:'))if x<0 or x>20:print (x//10)elif 0<=x<5:print(x)elif 5<=x<10:print(3*x-5)elif 10<=x<20:print(0.5*x-2)

A. 10
B. 100
C. 295
D. 48

为统计符合条件“性别(gender)为男,且职业(occupation)为老师,且年龄(age)40以下”的人数,下面if语句中正确的是()。

A. if (gender="男" and age<40 and occupation="老师"):n+=1
B. if (gender=="男" and age<40 and occupation=="老师"): n+=1
C. if (gender=="男" and age<40 or occupation=="老师"): n+=1
D. if (gender="男" or age<40 or occupation="老师"): n+=1

在Python的if语句中,无论条件表达式结果的值是什么,Python会将其结果转换为( )和( )两种,称为布尔型的值。

A. 真(True)
B. 假(FALSE)
C. 数字
D. 字符串

答案查题题库