EXY-SC-2930
第 46 题
下面循环队列采用牺牲一个存储单元(空出一个位置)的方法区分队空与队满,
full() 函数判断队列是否已满,横线处应填写( )。MAXN = 8
data = [0] * MAXN
front = 0
rear = 0
def full():
return _______________
语言:
Python
GESP真题
六级
2026.9
单选题号:
5
EXY-SC-2929
第 47 题
下列代码执行后的输出结果是( )。
s = []
q = []
for i in range(2,7,2):
s.append(i)
q.append(i)
s.pop()
q.pop(0)
print(s[-1], q[0])
语言:
Python
GESP真题
六级
2026.9
单选题号:
4
EXY-SC-2928
第 48 题
下列代码执行后的输出顺序是( )。
class Base:
def __init__(self):
print("B ", end="")
def __del__(self):
print("~B ", end="")
class Derived(Base):
def __init__(self):
super().__init__()
print("D ", end="")
def __del__(self):
print("~D ", end="")
def main():
p = Derived()
del p
main()
语言:
Python
GESP真题
六级
2026.9
单选题号:
3
EXY-SC-2927
第 49 题
下列代码横线处填写哪一项,才可以正确调用父类的带参数构造函数( )
class Machine:
def __init__(self, s):
self.id = s
class Robot(Machine):
def __init__(self, s, n):
_______________
self.level = n
语言:
Python
GESP真题
六级
2026.9
单选题号:
2
EXY-SC-2926
第 50 题
下列代码执行后的输出结果是( )。
class Animal:
def speak(self):
print("Animal ", end="")
class Cat(Animal):
def speak(self):
print("Cat ", end="")
def main():
p: Animal = Cat()
p.speak()
main()
语言:
Python
GESP真题
六级
2026.9
单选题号:
1
当前页显示 46 - 50
,共 1505 道单选题