题目编号
语言
全部语言
等级
全部等级
考查知识点
选择考查知识点 (0)
找到 1505 道单选题
EXY-SC-2930
第 46 题
下面循环队列采用牺牲一个存储单元(空出一个位置)的方法区分队空与队满,full() 函数判断队列是否已满,横线处应填写( )。
MAXN = 8
data = [0] * MAXN
front = 0
rear = 0
def full():
    return _______________
A
rear == front
B
(front + 1) % MAXN == rear
C
(rear + 1) % MAXN == front
D
rear == MAXN - 1
语言: 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])
A
4 4
B
2 2
C
6 6
D
6 2
语言: 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()
A
B D ~D ~B
B
B D ~D
C
D B ~D ~B
D
B D
语言: 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
A
Machine(s)
B
Machine.Machine(s)
C
super().__init__(s)
D
self.id = s
语言: 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()
A
Animal
B
Cat
C
Animal Cat
D
编译错误
语言: Python
GESP真题 六级
2026.9
单选题号: 1
当前页显示 46 - 50 ,共 1505 道单选题