已知变量 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. 字符串
程序的三种结构分为()
A. 顺序结构
B. 分支结构
C. 循环结构
D. 一般结构