测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A32437. 运行以下程序,输出结果是? ( )class A(): def __init__(self,x): self.x=x def add1(self): return self.x+self.xt1=A(3)t2=A(t1.add1())print(t2.add1())

单选题 困难

题目描述

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

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())

选项(单选)

上一题 下一题