青少年编程能力等级测评考生∶Python 编程二级 1 练习一、选择题1.队列在 Python 中,用( )实现队列的创建,队列的基本操作:( )( )( )( )线性数据结构又称线性表
A.随机;入队;出队;求队长;判队空B.列表;入队;出队;求队长;判队空C.列表;随机;出队;求队长;判队空D.入队;随机;列表;求队长;判队空2.Python 中 print(66
=66)结果是( )
A.1B.0C.TrueD.False3.下列 Python 语句中,会导致程序运行出错的语句是( )A.x=(y=1)B.x,y=y,xC.x=1;y=1D.x=y=14.小林编写一段文件读写操作代码,文件如图,代码段如下:file=open('ceshi
txt','w')file
write("python is a programming language
")file
close( )file=open('ceshi
txt','r')print(file
read( ))该代码段运行后,输出的结果为( )A.IA Distributed System Based on Python
B.python is a programming language
C.IA Distributed System Based on Python
python is a programming language
D.程序编译错误,不会输出结果5.在 Python 中,显示出信息 x,并要求输入数据的是( )
A.abs(x)B.float(x)C.print(x)D.input(x)6.在 python 中,想输出一行文字,要用到的函数是( )
A.input()B.int()C.print()D.float()