题目内容

以下选项中,不属于python保留字的是

A. throw
B. pass
C. while
D. def

查看答案
更多问题

程序运行时,键盘输入数字5,以下代码的输出结果是n = int(input())s = 100if n >= 5: n -= 10 s = 4if n < 5: n -= 10 s = 3print(s)

A. 3
B. 4
C. 0
D. 2

以下关于python分支的描述中,错误的是

A. 使用保留字if、elif和else来实现分支,每个if后面必须有elif或else
B. if-else结构是可以嵌套的
C. if后面的逻辑表达式的值为True时,执行if后面的语句块
D. 缩进是python的语法部分,缩进不正确会影响分支功能

python提供三种基本的数字类型,它们是

A. 整数类型、浮点数类型、复数类型
B. 整数类型、二进制类型、浮点数类型
C. 复数类型、二进制类型、浮点数类型
D. 整数类型、二进制类型、复数类型

下列一段Python代码的运行结果是count = 2while count > 0: print('hello') count = count - 1 breakprint('over')

A. hello hello over
B. hello over hello over
C. hello over
D. hello hello over over

答案查题题库