题库 Python题库 题目列表 运行以下Python程序,输出结果是?( )class&nb...
单选题

运行以下Python程序,输出结果是?( 

class A():
    def __init__(self,x):
        self.x=x
    def add1(self):
       return self.x+self.x
t1=A(3)
t2=A(t1.add1())
print(t2.add1())
A.

10

B.

12

C.

程序报错

D.

6

题目信息
2024年 3月 选择题
100%
正确率
0
评论
57
点击